Link to home
Start Free TrialLog in
Avatar of rxraza
rxraza

asked on

displaying text while the treeView is loading

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.
ASKER CERTIFIED SOLUTION
Avatar of tomasX2
tomasX2

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shilpa2784
shilpa2784

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 ="";
Avatar of rxraza

ASKER

For some reason I do not want to make use of an extra label to display text messages.