Programatically Change Scroll Bar Pos |
Post Reply |
Author | |
Milkman
Newbie Joined: 16 September 2005 Status: Offline Points: 11 |
Post Options
Thanks(0)
Posted: 21 October 2005 at 3:02pm |
Hello,
I have a property grid reading records from a database. The record structure changes dynamically from record-to-record. Everytime I move to a new record I use the BeginUpdate/EndUpdate methods (with the PropertyGridContext option) to delete all the propertygrid items and then recreate a new property grid based on the current record information. There is also an option to change the current record structure on the fly, which in turn called the same begin/endUpdate methods. Unfortunately whenever something is added and the scroll bar is at a position other than the top, the scroll position changes. Is there any way to programatically change the scroll bar position to, for instance, make a particular item located at the top of the grid? Any help would be appreciated. |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Try using PropertyGridItem.EnsureVisible method. This will scroll to a specific item of your choice.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |