473,385 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Hide a Treeview

Hi.
This is very odd see the code below, it runs through it UNTIL the
condition is set, and what happens then is the treeview (tvNodes) is no
longer active, but is visible. Never once is the Visible property set
false. Any takers?
private void tvNodes_KeyDown(object sender,
System.Windows.Forms.KeyEventArgs e)
{
tvNodes.Visible=!(tabControl1.SelectedIndex == 2);
Oct 7 '07 #1
1 1336
Alistair George wrote:
Hi.
This is very odd see the code below, it runs through it UNTIL the
condition is set, and what happens then is the treeview (tvNodes) is no
longer active, but is visible. Never once is the Visible property set
false. Any takers?
private void tvNodes_KeyDown(object sender,
System.Windows.Forms.KeyEventArgs e)
{
tvNodes.Visible=!(tabControl1.SelectedIndex == 2);
Changed the event fixed the issue as below:
private void tabControl1_SelectedIndexChanged(object sender,
EventArgs e)
{
tvNodes.Visible = !(tabControl1.SelectedIndex == 2);
}
Oct 8 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Steve | last post by:
Visual Studio 2003 C# Windows: I have a tree view control as my main menu control down the left side of my application. This has 2 Parent Nodes on it (Jobs and Employees). beneath these 2 main...
42
by: lauren quantrell | last post by:
So many postings on not to use the treeview control, but nothing recently. Is it safe to swim there yet with Access 2000-Access 2003?
4
by: meska | last post by:
Hi all is there a way in a treeview to hide or disable node without reloading the tree or removing the node? I meen if i could programaticly set the node to be disabled ( grayed out, user cannot...
6
by: L.M | last post by:
Hello, I knew how to use the treeview under VB6. After migrating to .NET, well, I'm lost. I try to add a new node, either to the same level or as a child to a selected node in the treeview....
14
by: Mr.D | last post by:
How do I save/load the contents of a Treeview to a file? I have found several good examples written i VB6, but not a single one for VB.NET. Please help. ---- Tim
4
by: hartbypass | last post by:
Hello, I have treeview control that I am populating with a XML file. The structure is: Treenode Level 1 Item1 Item2 Item3
8
by: Matt MacDonald | last post by:
Hi All, I have a form that displays hierarchical categories in a treeview. Ok so far so good. What I was to do is have users be able to select a node in the treeview as part of filling out the...
0
by: jotaefe | last post by:
Hi, Is it possible to hide the root node in a treeview without editing the original xml? To populate the xml file, I am using this functions: private void PopulateTree(TreeView...
6
by: Max2006 | last post by:
Hi, I need to hide a series of siteMapNodes to certain roles. That means roles have access to the siteMapNode, but the node doesn't appear on the navigation menu. I'll use Response.Redirect to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.