View previous topic :: View next topic |
Author |
Message |
medbiller
Joined: 20 Dec 2007 Posts: 39 Location: Arroyo, PR
|
Posted: Wed May 12, 2010 4:52 pm Post subject: Programmatically scroll virtual tree vertically up |
|
|
I'm setting the virtual tree datasource and expnading all rows & levels. The screen shows the bottom rows when done. I'd like to programmatically scroll verticaly up to the top instead of having to use the mouse or keyboard. Thanks. _________________ Medical billing & records developer. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed May 12, 2010 11:04 pm Post subject: |
|
|
To scroll to the top you can set the VirtualTree.TopRowIndex to either 0 or 1 (depending on whether you have ShowRootRow set to true or false respectively). You could also turn off AutoScrollOnExpand so that the tree won't attempt to scroll child rows into view as you are expanding rows. _________________ Infralution Support |
|
Back to top |
|
|
medbiller
Joined: 20 Dec 2007 Posts: 39 Location: Arroyo, PR
|
Posted: Thu May 13, 2010 12:29 am Post subject: AutoScrollOnExpand = False worked, but couldn't make .TopRow |
|
|
AutoScrollOnExpand = False worked, but couldn't make .TopRowIndex = 1 to work. _________________ Medical billing & records developer. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu May 13, 2010 12:40 am Post subject: |
|
|
I've just checked that TopRowIndex = 1 works (using the DataSet Browser Sample project). There must be some other issue if this isn't working. If you are doing a lot of expanding then setting AutoScrollOnExpand to false while you do it will definitely be more efficient. _________________ Infralution Support |
|
Back to top |
|
|
|