473,804 Members | 3,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Treeview drives me crazy!

I have a treeview control, which is docked on a panel. When I call the
procedure to fill this treeview from the load event it works fine. It loads
all nodes, and displays them nicely.

However, when I call the very same procedure at a later stage (after a
login) then the nodes don't show. I traced with the debugger, and the nodes
do get created, but when I check the IsVisible property, it is set to No.

So, now comes the weirdest part... I cut the procedure that fills the
treeview in two. The first part loads header nodes, which are the same for
every user. I call this procedure from the load event. Then after the login
I call the 2nd part, which adds child nodes to the previously created header
nodes. When the form shows, the header nodes are shown, the later added
child nodes are not. Again, they do exist, but I can't seem to make them
visible... What's going on here?

Tia,
Martin

Feb 17 '06 #1
4 1384
Is the update procedure in the same thread context as the UI?

"Martin" <x@y.com> wrote in message
news:Oo******** *****@TK2MSFTNG P11.phx.gbl...
I have a treeview control, which is docked on a panel. When I call the
procedure to fill this treeview from the load event it works fine. It loads
all nodes, and displays them nicely.

However, when I call the very same procedure at a later stage (after a
login) then the nodes don't show. I traced with the debugger, and the
nodes do get created, but when I check the IsVisible property, it is set
to No.

So, now comes the weirdest part... I cut the procedure that fills the
treeview in two. The first part loads header nodes, which are the same for
every user. I call this procedure from the load event. Then after the
login I call the 2nd part, which adds child nodes to the previously
created header nodes. When the form shows, the header nodes are shown, the
later added child nodes are not. Again, they do exist, but I can't seem to
make them visible... What's going on here?

Tia,
Martin

Feb 17 '06 #2
Hi Gregory,

Thanks for your reply. I'm a long-time VB6 programmer, just starting in
VB2005 and I have to admit: I don't even know what a thread context is.
However.. I did create a class which is instanced within my app as a
seperate object, like a kind of "Handler". This handler is executing the
method of the MDI container form to display the remaining nodes. But I don't
think that would be a seperate thread, and the method to display these nodes
is still in the MDI container form.

Tia,
Martin

"gregory_ma y" <None> wrote in message
news:O3******** ********@TK2MSF TNGP14.phx.gbl. ..
Is the update procedure in the same thread context as the UI?

"Martin" <x@y.com> wrote in message
news:Oo******** *****@TK2MSFTNG P11.phx.gbl...
I have a treeview control, which is docked on a panel. When I call the
procedure to fill this treeview from the load event it works fine. It
loads all nodes, and displays them nicely.

However, when I call the very same procedure at a later stage (after a
login) then the nodes don't show. I traced with the debugger, and the
nodes do get created, but when I check the IsVisible property, it is set
to No.

So, now comes the weirdest part... I cut the procedure that fills the
treeview in two. The first part loads header nodes, which are the same
for every user. I call this procedure from the load event. Then after the
login I call the 2nd part, which adds child nodes to the previously
created header nodes. When the form shows, the header nodes are shown,
the later added child nodes are not. Again, they do exist, but I can't
seem to make them visible... What's going on here?

Tia,
Martin


Feb 17 '06 #3
Hi Gregory,

That was the problem! Thanks for pointing me in the right direction.

Martin

"gregory_ma y" <None> wrote in message
news:O3******** ********@TK2MSF TNGP14.phx.gbl. ..
Is the update procedure in the same thread context as the UI?

"Martin" <x@y.com> wrote in message
news:Oo******** *****@TK2MSFTNG P11.phx.gbl...
I have a treeview control, which is docked on a panel. When I call the
procedure to fill this treeview from the load event it works fine. It
loads all nodes, and displays them nicely.

However, when I call the very same procedure at a later stage (after a
login) then the nodes don't show. I traced with the debugger, and the
nodes do get created, but when I check the IsVisible property, it is set
to No.

So, now comes the weirdest part... I cut the procedure that fills the
treeview in two. The first part loads header nodes, which are the same
for every user. I call this procedure from the load event. Then after the
login I call the 2nd part, which adds child nodes to the previously
created header nodes. When the form shows, the header nodes are shown,
the later added child nodes are not. Again, they do exist, but I can't
seem to make them visible... What's going on here?

Tia,
Martin


Feb 18 '06 #4
This issue is a weird one. I manifests it self in strange ways. The .Net
framework seems to just blow apart with this issue.

"Martin" <x@y.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Hi Gregory,

That was the problem! Thanks for pointing me in the right direction.

Martin

"gregory_ma y" <None> wrote in message
news:O3******** ********@TK2MSF TNGP14.phx.gbl. ..
Is the update procedure in the same thread context as the UI?

"Martin" <x@y.com> wrote in message
news:Oo******** *****@TK2MSFTNG P11.phx.gbl...
I have a treeview control, which is docked on a panel. When I call the
procedure to fill this treeview from the load event it works fine. It
loads all nodes, and displays them nicely.

However, when I call the very same procedure at a later stage (after a
login) then the nodes don't show. I traced with the debugger, and the
nodes do get created, but when I check the IsVisible property, it is set
to No.

So, now comes the weirdest part... I cut the procedure that fills the
treeview in two. The first part loads header nodes, which are the same
for every user. I call this procedure from the load event. Then after
the login I call the 2nd part, which adds child nodes to the previously
created header nodes. When the form shows, the header nodes are shown,
the later added child nodes are not. Again, they do exist, but I can't
seem to make them visible... What's going on here?

Tia,
Martin



Feb 20 '06 #5

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

Similar topics

7
3384
by: Oliver Andrich | last post by:
Hi everybody, I have to write a little skript, that reads some nasty xml formated files. "Nasty xml formated" means, we have a xml like syntax, no dtd, use html entities without declaration and so on. A task as I like it. My task looks like that... 1. read the data from the file. 2. get rid of the html entities 3. parse the stuff to extract the content of two tags.
11
3354
by: doltharz | last post by:
Please Help me i'm doing something i though was to be REALLY EASY but it drives me crazy The complete code is at the end of the email (i mean newsgroup article), i always use Option Explicit and Response.Expires=-1,
1
2404
by: Steven | last post by:
Hello, I have a problem in using TreeView. I have made a dialog with TreeView. When I open this dialog , the Drives in the computer could be show in this TreeView.This time, I click the node of directory and get into the directory of "my Directory", then , I close the dialog. Next time, when I open the dialog again, I hope the directory that I have accessed before could be opened automatically. Just like this:
3
821
by: feel | last post by:
Goin' crazy with this recursive function ported from delphi... I send a string like DirA/ DirB /DirC but i get in the treeView each one in a new node.Cant get the child node....!! -DirA -DirB -DirC instead of: DirA | - DirB
2
3461
by: Jenya | last post by:
Hello all! I'm trying to create a control which will show list of drives, subdirectories, and files - something like Windows Explorer. OK, all this stuff is working, except for one thing - all drives and dirs (which are nodes in TreeView) have appropriate images assigned to them. Wherever I click on the node - the icon is changes to the first one in ImageList. If another node is selected - the icon is restored. Any advice ?
2
1664
by: SamSpade | last post by:
I'm looking at using a TreeView control and can see how to fill in MyComputer with directory and file names. But I have no idea of how to include things like My Documents and My Network Places Anyone how to do that. Thanks
0
1224
by: SamSpade | last post by:
Below is how I add the drives to an explorer like TreeView. What I don't know how to do is to add an Icon for MyComputer. Any help would be appreciated. Dim SysIconList% = WinApi.SHGetFileInfo(IntPtr.Zero, 0, SFI, Marshal.SizeOf(SFI), Win32.Shell.SHGFI_SYSICONINDEX +
4
14181
by: Ben Coats | last post by:
Hey, I'm trying to find code for an Explorer-style Directory ComboBox. (You know, it display "Desktop", "My Computer", all drives, etc., but it has a treeview control inside the combobox so that you can navigate through the file system as well.) I've found some on the web, but all of them just have the drives and desktop directories and are static in that you cannot expand the directories. I normally build a treeview control to do it with,...
8
12778
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 form. I only want to allow single selection, so using checkboxes is out of the question. It works as is, but it makes the form very cumbersome if every time that a user selects a node, the whole page has to reload. Is there a way to have a node...
0
10558
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10318
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10302
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9130
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6844
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.