Solved

displaying text while the treeView is loading

Posted on 2004-09-10
3
196 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
Comment Utility
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
Comment Utility
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
Comment Utility
For some reason I do not want to make use of an extra label to display text messages.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now