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: Tom Benson <tombenson@mac.com>
Date: Tue, 01 Jul 2008 07:20:21 +1000
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
You cannot create a control form a base class. you can only clone exisiting controls. This is because there is no way to add event handlers to controls at runtime.

So, you need to add an instance of "MyScrollBar" to the window in the interface builder.

From there, yo can clone as many copies of it as you want, and assign it to the canvas' property.

- Tom

On 01/07/2008, at 7:01 AM, 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?




_______________________________________________
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>