Solved

displaying text while the treeView is loading

Posted on 2004-09-10
3
199 Views
Last Modified: 2010-04-15
Hi folks:

I want to display some text like "loading data, please wait...." inside the treeview control while the treeview is loading. How can I do that? thanks in advance.
0
Comment
Question by:rxraza
3 Comments
 
LVL 5

Accepted Solution

by:
tomasX2 earned 100 total points
ID: 12032557
well if your problem is really the time it takes to retrieve the data and not the time it takes to throw it into the treeview then you can

                  treeView1.Nodes.Add(new System.Windows.Forms.TreeNode("loading data, please wait...."));
                  this.Refresh();
                  object[] nodes = GetAWholeBunchOfNodes();
                  treeView1.Nodes.Clear();
                  foreach( object node in nodes )
                  {
                        treeView1.Nodes.Add(node);
                  }
0
 

Expert Comment

by:shilpa2784
ID: 12042024
If it is taking lots of time throw it on the treeview then you can use a lable placed just above the treeview and change its text accordingly..

label1.Text = "Loading data...Please wait"
 object[] nodes = GetAWholeBunchOfNodes();
               treeView1.Nodes.Clear();
               foreach( object node in nodes )
               {
                    treeView1.Nodes.Add(node);
               }
label1.Text ="";
0
 

Author Comment

by:rxraza
ID: 12044259
For some reason I do not want to make use of an extra label to display text messages.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Where did System.Data.Objects go? 2 40
VB: Convert 2 dates to specific format 24 52
Can I command line build a C# application? 6 40
"Emulate" TAB key when press Enter Key 3 45
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question