[Gambas-user] Delete button ?
T Lee Davidson
t.lee.davidson at gmail.com
Tue Jan 3 14:24:55 CET 2023
On 1/3/23 07:48, dirk wrote:
> I create a button like this in the form 'lager':
> ' Gambas class file
> ' lager.class
> Public Sub Form_Open()
> With ButtonSave = New Button(FMain.Panel1) As "ButtonP"
> .H = 28
> .W = 28
> .X = 959 - 35
> .Y = 5
> .Expand = False
> .Picture = Picture["icon:/32/print"]
> End With
> If I make another form visible in workspace1, the button should disappear.
> the button should only be visible if the form is 'lager' visible.
It is difficult to tell exactly what you're trying to accomplish without knowing what forms you have in your project. But, "New
Button(FMain.Panel1)" creates a button with FMain.Panel1 as its parent - thereby placing it on the FMain form.
Gianluigi's example is a good illustration.
More information about the User