On Jun 30, 2008, at 4:01 PM, Jay Rimalrick wrote:
I have a custom ScrollBar and Canvas classes. The ScrollBar is a
property of the canvas. However, I cannot get the ScrollBar to
display.
In the Canvas Open Method I write:
sbar = new MyScrollBar
And in MyScrollBar constructor:
me.width = 1000
me.height = 50
me.Enabled = true
me.Visible = true
me.Minimum = 0
me.Maximum = 100
me.Refresh
What can I do to fix this, besides putting the ScrollBar directly
in the Window via the interface builder?
You nailed it on the head. You'll need a container control; the
only way a scrollbar could display inside the canvas is if you
somehow shanghaied the graphics context of the scrollbar to point to
that of the canvas, then get it's (internal) Paint() event to fire
when the canvas' Paint() event fires, sort of like drawing in an off-
screen buffer, then blitting it to the 'g' object in the canvas' Paint
() event so that both will redraw when you obscure the canvas, then
un-obscure part or all of it.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|