[Gambas-user] btn does not work
Charlie Reinl
na2492 at ...9...
Tue Dec 28 21:15:23 CET 2004
>Hi gambanauts,
>
>i try to make a button by code.
>The program runs, but the button is like passiv.
>
>Any hints?
>
>Thanks in advance.
>
>Beste Grüsse
>Jochen
Salut Jochen,
the following is th class -file of a form, without any element.
' Gambas class file
PRIVATE lb AS Label
PRIVATE btn AS Button
PUBLIC SUB _new()
btn = NEW Button(ME)
' btn = NEW Button(Form1)
btn.X = 20
btn.Y = 30
btn.Width = 80
btn.Height = 30
btn.Caption = "Hallo 1"
btn.enabled = TRUE
btn = NEW Button(ME) AS "myButton"
btn.X = 110
btn.Y = 30
btn.Width = 80
btn.Height = 30
btn.Caption = "Hallo 2"
btn.enabled = TRUE
btn = NEW Button(ME) AS "myButton"
' btn = NEW Button(Form1)
btn.X = 200
btn.Y = 30
btn.Width = 80
btn.Height = 30
btn.Caption = "Hallo 3"
btn.enabled = TRUE
lb = NEW Label(ME)
lb.X = 20
lb.Y = 80
lb.Width = 200
lb.Height = 50
lb.Text = "was wird passieren?"
END
PUBLIC SUB myButton_Click()
lb.Text = "myButton_Click (" & LAST.Text & ")"
END
PUBLIC SUB btn_Click()
lb.Text = "btn_Click"
END
What I use is the group, and I don't know whay btn_Click want work
Amicalment
Charlie
* Gesendet mit / Sent by: FEN-Webmail * http://www.fen-net.de *
More information about the User
mailing list