On Sep 17, 2006, at 9:01 PM, Gary Edge wrote:

I'm trying to create a control array of canvas based buttons. I have a button class (AMAButton) with a super class of canvas. I drag this class to a container control and name it's to 'TemButton', then set it's index to 0.

In code I try to clone it:

dim b as AMAButton
dim caption as string = 'Test'

b = new TemButton
b.width = b.graphics.stringwidth( caption ) + 10 // faults here because graphics is nil - Why?????
buttonlist.append b
...


You should also get a syntax error on the second line. But the cloning on a containercontrol works fine for me . I'm assuming that you embedded the containercontrol on a window. In my test, I embedded it by dragging from the Controls pane. How are you doing it? I ran your code above from a pushbutton on the container control using 2006R3 on MacOS.

Is this something you can demonstrate on a new project?


Best,

Jack
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to