[Gambas-user] Array of Runtime Objects

-=FoX=- _root at ...324...
Sun Jan 11 21:24:40 CET 2004


Fabien Bodard wrote:

>Le Dimanche 11 Janvier 2004 18:09, -=FoX=- a écrit :
>  
>
>
>First why don't you use a collection in place of the array
>It's more simple to refresh and have not black when you delete a play card (or 
>maby you game workspace work like a grid... in this case array is better).
>
>and for the event... Have a look at Panel_Delete()
>
>And When you create a new panel give a value to the Tag properti of yhe new 
>panel
>
>MyPanel = New Panel(Me) as MyPanel
>ArPanel.Add(MyPanel)
>MyPanel.Tag = ArPanel.Count
>MyPanel.Move (12,13,25,50)
>MyPanel.Visible = true
>
>public Sub Button_Remove()
>
>ArPanel[2].Delete
>
>End 
>
>Public Sub MyPanel_Delete()
>
>RefreshCards()
>
>End If
>  
>
Ok, i have make a very simple example.
in the real, the "playcard" is a separate class, that builds  a panel,  
7 images, 2 labels, 1 frame and 3 radiobuttons.
(And the playcard is not a pleycard :D is a panel with some images etc...)
When i click an image "killme" i must destroy this object in the main 
window., then i must update the array and replace all the object in 
order to close the hole.
 :)








More information about the User mailing list