[SOLVED] Access Information on program created control

Post your Gambas programming questions here.
Post Reply
User avatar
sadams54
Posts: 143
Joined: Monday 9th July 2018 3:43am
Contact:

[SOLVED] Access Information on program created control

Post by sadams54 »

I actually have a question.
background:
I have buttons that are created dynamically based on ever changing information. The buttons are placed and arranged with a .text and a .tag
the buttons are attached to a click event that does work.


How do I wipe out the dynamically created buttons so I can make new dynamically created button controls?
Last edited by sadams54 on Wednesday 15th November 2023 9:06pm, edited 1 time in total.
User avatar
BruceSteers
Posts: 1579
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Access Information on program created control

Post by BruceSteers »

Look at Control.Delete and Container.Children.Clear

ButtonPanel.Children.Clear


For Each c As Control In ButtonPanel.Children
  If c.Name Like "Del_*" Then c.Delete
Next


Public Sub AutoDestructiveButton_Click()

 Last.Delete

End
If at first you don't succeed , try doing something differently.
BruceS
User avatar
sadams54
Posts: 143
Joined: Monday 9th July 2018 3:43am
Contact:

Re: Access Information on program created control

Post by sadams54 »

Thank you that clued me into the right place
Post Reply