layer a canvas over controls

so i build my own scroller for a canvas that embeds controls, now i had to make another canvas be layered over the top which is the scrollbar.
so far i have not run into any problems doing this and it runs and looks just like a native scrollerbar which is great.
i was wondering, do you think i would run into any problems when laying a canvas over another canvas that has embeded controls?

[quote=87949:@Paul Baka]so far i have not run into any problems doing this and it runs and looks just like a native scrollerbar which is great.
i was wondering, do you think i would run into any problems when laying a canvas over another canvas that has embeded controls?[/quote]

Just why do you use a canvas to imitate a native scrollbar when a real scrollbar would work just fine ?

By ‘layering over’ if you are meaning ‘embedding a canvas into a canvas’, it should be no more of a problem than embedding any other control. If you are placing a canvas on top of a canvas without embedding it, the canvas on top will intercept mouse and keyboards events unless you explicitly return true in such events.

In general it’s not a very good idea to layer canvases. Depending on when the paint events fire, you may not get the layering affect you are desiring.

And yes - why are you making your own scroll bars???

well i have a side bar with a list of things on it and it’s not very wide. the scroller takes up a lot of space. and the list is very dark while the scroller is white. it just looks wrong in every way. but my custom one looks good and works fine so far with all the testing i have done. it is for OSX, looks and acts just like a native scroller.

You can adjust the width of the scroll bar and in OS X, you can make it disappear. It’s basically acting like a native control (in fact - it may be - I’m not sure ).