473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

treeview control 2.0 scroll to top

Hello Gurus,

After loading my treeview control in windows form, how to i scroll to
the top and select the 1st node?

Any help is greatly appreciated

Oct 12 '06 #1
3 6408
tv.SelectedNode = tv.Nodes[0];

--
Robbe Morris - 2004-2006 Microsoft MVP C#
I've mapped the database to .NET class properties and methods to
implement an multi-layered object oriented environment for your
data access layer. Thus, you should rarely ever have to type the words
SqlCommand, SqlDataAdapter, or SqlConnection again.
http://www.eggheadcafe.com/articles/..._generator.asp

<hg****@gmail.comwrote in message
news:11**********************@c28g2000cwb.googlegr oups.com...
Hello Gurus,

After loading my treeview control in windows form, how to i scroll to
the top and select the 1st node?

Any help is greatly appreciated

Oct 13 '06 #2
Hello,
that was my 1st attempt as well, but it did not work, it's selected(not
visible), but my tree is at the bottom still. When the tree gets
populated, the scroller grows and once it's done, it's at the bottom of
the tree :(

thanks for the suggestion!

Robbe Morris [C# MVP] wrote:
tv.SelectedNode = tv.Nodes[0];

--
Robbe Morris - 2004-2006 Microsoft MVP C#
I've mapped the database to .NET class properties and methods to
implement an multi-layered object oriented environment for your
data access layer. Thus, you should rarely ever have to type the words
SqlCommand, SqlDataAdapter, or SqlConnection again.
http://www.eggheadcafe.com/articles/..._generator.asp

<hg****@gmail.comwrote in message
news:11**********************@c28g2000cwb.googlegr oups.com...
Hello Gurus,

After loading my treeview control in windows form, how to i scroll to
the top and select the 1st node?

Any help is greatly appreciated
Oct 13 '06 #3
wow, this was silly, i was using the code between BeingUpdate() and
EndUpdate() .. :)
sorry! thanks for the help tough!!

hg****@gmail.com wrote:
Hello,
that was my 1st attempt as well, but it did not work, it's selected(not
visible), but my tree is at the bottom still. When the tree gets
populated, the scroller grows and once it's done, it's at the bottom of
the tree :(

thanks for the suggestion!

Robbe Morris [C# MVP] wrote:
tv.SelectedNode = tv.Nodes[0];

--
Robbe Morris - 2004-2006 Microsoft MVP C#
I've mapped the database to .NET class properties and methods to
implement an multi-layered object oriented environment for your
data access layer. Thus, you should rarely ever have to type the words
SqlCommand, SqlDataAdapter, or SqlConnection again.
http://www.eggheadcafe.com/articles/..._generator.asp

<hg****@gmail.comwrote in message
news:11**********************@c28g2000cwb.googlegr oups.com...
Hello Gurus,
>
After loading my treeview control in windows form, how to i scroll to
the top and select the 1st node?
>
Any help is greatly appreciated
>
Oct 13 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Jim | last post by:
The below problem occurs randomly too, but I've managed to isolate a sequence of events when it always happens: I have two forms (say Form1 and Form2). Form 1 contains a TreeView control. A...
1
by: Oliver | last post by:
I have seen mention of TreeView controls in other threads, but cannot find information about these in the Online Help. I feel that I might be missing out on some useful functionality. How can I...
3
by: Benny Raymond | last post by:
I've looked around msdn for about an hour now and can't figure out how to place an event when the user scrolls, or even how to get the value of where the scroll bar is actually placed... Anyone...
5
by: rh | last post by:
I created a user control that is made up of a TreeView and a VScrollBar. I set the TreeView.FullRowSelect = True and it works as expected (full row is visible, appears on top of everything else)...
0
by: Laksh | last post by:
Hi, I'm using Treeview control that comes with VS 2005. In my page I have this control inside a <div> tag. Now this <div> is made visible when a client side button click event is fired. I want to...
4
by: praveen | last post by:
I have a form with treeview control loaded from xml document,text box, two buttons named "Find" and "FindNext" and my treeview which looks like below. Details |__ policy status |__ created by...
2
by: Claus | last post by:
Hello, I have a long treeview with scrollbars. When I scroll down and press a treeview node, then the Load event fires and navigate in an iframe to another page. The problem is, that afterwards...
1
by: Daves | last post by:
Sorry folks but I will be reposting this question from 6/5 until someone gives me an answer - the question is very easy and so ought the answer to be. I really need the answer! ------- I'm...
8
by: (PeteCresswell) | last post by:
I've got a TreeView in which I present a rather wide line of info for some branches. The user doesn't care to see all the info all of the time and we're tight on horizontal screen space, so we've...
1
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post by:
Hi, Is there a way to detect whenever scrollbars (the vertical) are shown on a treeview I need to know. 1) If scrollbars are visible after a rezise 2) If scrollbars are visible after change...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.