I have a canvas with embedded controls and I like to draw a simple scrollbar inside but the
drawing event is overwritten by the controls.
Stupid question but what is the drawing order and how can I get the scrollbar (or anything you paintinthere)
to be overlayed ?
You might also consider putting a second canvas next to the first one in which you will draw the scroll bar. If you get the locking right, no one will see it.
Is there a reason you’re not using a scroll bar control?
If I don’t embedd I am not able to scroll any content right ?
@ Greg,
I actually wanted to create a single canvas with scrolling bars which are MacOS like (overlay) and though it would be better to control everything in one canvas instead of subclassing and honestly, I saw Sam Rolands piDogScrollBar+Layers and thought I could make that too.
Anyway. I finally ended up using a second canvas for the vscroller with the right lock, otherwise the scroller gets scrolled too.
This looks quite good but if I would know how to get all my stuff in a NSScrollView, I would feel way more happy instead of using a custom scroller.
This took a lot of work to accomplish gosh but I am open for any sugestions. Note the behavior of cells gettinga out of
view and adjusted again.
If I don’t embedd I am not able to scroll any content right ?[/quote]
Wrong.
You just change the .left properties of the controls you want to scroll.
An easy way to do that is to set the .tag property to the original LEFT
Then when the scrollbar is changed, set the .LEFT property to control.TAG - Scrollbar1.value