realbasic-nug
[Top] [All Lists]

Re: ScrollBar as Property of Canvas

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: ScrollBar as Property of Canvas
From: William Squires <wsquires@satx.rr.com>
Date: Mon, 30 Jun 2008 20:36:22 -0500
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <736157.58834.qm@web65503.mail.ac4.yahoo.com>
References: <736157.58834.qm@web65503.mail.ac4.yahoo.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com

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>


<Prev in Thread] Current Thread [Next in Thread>