[Gambas-user] Removing a runtime created control

Bruce adamnt42 at gmail.com
Thu Nov 26 16:44:48 CET 2020


On 27/11/20 12:18 am, KKing wrote:
> I'll need to do some more tests... suspect maybe running into another 
> LXDE issue ... I tried both
>        Me.Controls["My_Button"].Delete
> and
>        Me["My_Button"].Delete
> both executed without error but the toolbar buttons remained on the form 
> and the My_Button_Click event still fired from.
> 
> I did try
> 
>      me.childrens.clear
> 
> but that obviously removed other controls I didn't want removed
> 
>> Hi, you could use me.childrens.clear for delete all the controls.
>>
>> then if you want to delete a specific control what you know its name you
>> could use Me["controlnametokill"].delete
> 
> 
> 
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----

You appear to be trying yo remove the Event bame in that code above. You 
need to remove the control name!

bruce


More information about the User mailing list