Solved

displaying text while the treeView is loading

Posted on 2004-09-10
3
202 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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
itextsharp with c# 3 35
asp.net repeater 2 36
.Net remove carriage returns, line feeds and tabbs 5 36
How to calculate the sum of all rows at each new row in C# 4 61
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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