On Feb 15, 2010, at 12:21 PM, Roger Clary wrote:
>
> On Feb 15, 2010, at 12:54 PM, Michael D Mays wrote:
>
>> dim MyNewerCanvas As MyCanvas
>> MyNewerCanvas.top = 100
>> MyNewerCanvas.Left = 199
>> MyNewerCanvas.Graphics.FillRect 0,0,100,100
>>
>> but the FillRect statement generates an error because the graphic of
>> MyNewerCanvas is nil.??
>
> Do the drawing to all of your canvases in the .paint event of the canvas. If
> the canvas is part of an array, you will have an index number passed to the
> paint event so you can determine to which instance you are drawing.
> BTW - you do not HAVE to subclass canvas in order to create an array.
>
> You can drag an instance of a canvas to your window in the IDE, give it a
> name and an index number, (i.e. myCanvas) and then create new instances of
> the array with
>
> dim c As canvas
>
> c = New myCanvas
> c.Top = ??
> c.Left = ??
>
> etc.
>
>
> Roger Clary
> Class One Software
> http://www.classonesoftware.com
> Educational Software for Lifelong Learning
That works for me.
I guess statements such as
Dim i as Integer
myControlArray(i) = someProperty
don't work/don't work all the time?
Thanks,
Michael
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|