treeview control 2.0 scroll to top

  • Thread starter Thread starter hgirma
  • Start date Start date
H

hgirma

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
 
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!
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/adonet_source_code_generator.asp





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
 
wow, this was silly, i was using the code between BeingUpdate() and
EndUpdate() .. :)
sorry! thanks for the help tough!!

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!
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/adonet_source_code_generator.asp





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
 
Back
Top