Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

displaying text while the treeView is loading

Posted on 2004-09-10
3
Medium Priority
?
206 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 400 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

927 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