no scroll events in ScrollableControl?

J

Jens Weiermann

Hi!

I'm creating a custom control derived from ScrollableControl (a picture
viewer similar to what ACDSee does). My problem is that I couldn't find any
scroll events (what i would expect from a ScrollableControl)...

Any hints?

TIA!
Jens
 
V

Victor Garcia Aprea [MVP]

Hi Jens,

ScrollableControl is a winform control and you're posting to a ng for building web controls. You may get better luck by trying a more appropiate ng. Good luck!

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
 
B

Brett Ryan

Hello Jens, I have come to find the same problem. The fact that there is
no OnScroll method available is rather disturbing, it exist in
HScrollBar and VScroll bar though not ScrollableControl.

The only solution I have found was to create instances of these two
controls, add them to the Controls collection manually and add an event
handler for the HScrollBar.Scroll and VScrollBar.Scroll methods. The
pain about this is that you have to manually position the scrollbars and
adjust the Value property every time the control has been resized.

I found it interesting that i just stumbled on to this link
http://longhorn.msdn.microsoft.com/lhsdk/ref/ns/system.windows.forms/c/s
crollablecontrol/e/scroll.aspx

Which shows that the Scroll events are exposed.

If you found a cleaner solution I would be interested to know what you
came up with

Regards
Brett Ryan
 
J

Jens Weiermann

Hi Brett,
If you found a cleaner solution I would be interested to know what you
came up with

after I realized I had posted this to the wrong group (as well as you ;-),
I asked again in microsoft.public.dotnet.framework.windowsforms.controls
and was pointed to the following link by Herfried Wagner:

http://groups.google.de/[email protected]

Works perfect for me now!

Regards,
Jens
 

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

Members online

Forum statistics

Threads
473,890
Messages
2,569,972
Members
46,310
Latest member
ClariceGal

Latest Threads

Top