[Gambas-user] making a gui without form editor

Jochen Georges jochen.georges at ...22...
Mon May 5 21:23:33 CEST 2003


hi gambasians

i try to make a program with gui, but i do not want to use the form 
editor.

with the following code i get a form, but without button and label. 

can anybody give me a hint?

many thanks !

beste gruesse
jochen
'--------------------------------------------------------------------------------
' Gambas class file
STATIC hForm AS Form  
hButton AS Button
hLabel AS Label

STATIC PUBLIC SUB Main()
    hForm = NEW Form
    hForm.X = 20
    hForm.Y = 20
    hForm.Width = 500
    hForm.Height = 500
    hForm.show
END

PUBLIC SUB _new()
  hButton = NEW Button(hForm) AS "Button1"
  hButton.X = 8
  hButton.Y = 30
  hButton.Width = 80
  hButton.Height = 40
  hButton.Text = "hello"
  hButton.show
  hLabel = NEW Label(hForm) AS "Label1"
  hLabel.X = 8
  hLabel.Y = 100
  hLabel.Width = 200
  hLabel.Height = 40
  hLabel.show
END

PUBLIC SUB Button1_click()
  hLabel.Text = "hello hello"  
END




More information about the User mailing list