scrolling a user control

G

Guest

Hi,

I have created a user control which I then add standard controls to
prgramatically i.e. picture box, text box etc.

I'm just wondering if it is possible to scroll to given position in the
scrollable region? So lets say the control has a height of 300 pixels and the
scrollable height is 1000 pixels then I'd like to be able to just make pixel
500 appear in the top left of the controls visible area.

If this isn't possible what alternatives are there for scrolling a user
control programatically.

Many thanks in advance for any answers.

Best Regards,

Steve.
 
H

Herfried K. Wagner [MVP]

Steve Bugden said:
I have created a user control which I then add standard controls to
prgramatically i.e. picture box, text box etc.

I'm just wondering if it is possible to scroll to given position in the
scrollable region? So lets say the control has a height of 300 pixels and the
scrollable height is 1000 pixels then I'd like to be able to just make pixel
500 appear in the top left of the controls visible area.

If this isn't possible what alternatives are there for scrolling a user
control programatically.

Take a look at the control's 'AutoScrollPosition' property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top