How set Scroll postion explicitely

  • Thread starter Thread starter Woody Splawn
  • Start date Start date
W

Woody Splawn

I have a winform where I would like to explicitelty set the Horizontal
scroll postion for a panel.

I would have guessed something like the following would work but it does not

Contracts2_Fill_Panel.AutoScrollPosition.X = someNumber

Could someone give me the proper syntax?
 
Hi,

If you have got AutoScroll enabled you can use the AutoScrollPosition
property.

James
 
Woody,
AutoScrollPosition is a Point structure you need to set it to a Point
structure. You cannot change just one part (X or Y) of the structure.

Me.AutoScrollPosition = New Point(0,10)

Hope this helps
Jay
 
* "Woody Splawn said:
I have a winform where I would like to explicitelty set the Horizontal
scroll postion for a panel.

I would have guessed something like the following would work but it does not

Contracts2_Fill_Panel.AutoScrollPosition.X = someNumber

Could someone give me the proper syntax?

Use '<...>.AutoScrollPosition = New Point(SomeNumber, <...>.AutoScrollPosition.Y)'.
 
Back
Top