[Gambas-user] Re: create an form on runtime
Christian Faure
christian.faurebouvard at ...357...
Mon Jan 17 12:34:35 CET 2005
El Lunes, 17 de Enero de 2005 06:15, Frank Berg escribió:
> hi,
>
> 1.)
> i was try to create an form to runtime.
> the form is created, but the events are not received.
>
> 2.)
> events on button und labels are ok
>
> 3.)
> i can`t set the timer on the form
> its come the error "to many parameters"
> its seems to be an conflict between the timer function and the timer class
>
> what is wrong?
>
> frank
Hi,
Event Click NOT EXISTS in Form object
in Class1.TestForm() you can add:
object.Attach( <object> , ME , <groupname> )
------------ Class1 modified: ---------------------
' Gambas class file
PRIVATE fo AS Form
PRIVATE ti AS Timer
PRIVATE TimerFlag AS Boolean
PUBLIC SUB testForm()
DIM x AS Integer
fo=NEW form AS "myForm"
fo.Height =200
fo.Width =300
fo.Caption = "New Form created by class"
object.Attach(fo,ME,"myForm")
ti=NEW Timer AS "myTimer"
ti.Delay =5000
ti.Enabled =TRUE
object.Attach(ti,ME,"myTimer")
fo.Show
fo.SetFocus
END
PUBLIC SUB myForm_DblClick()
PRINT "receive an DblClick"
END
PUBLIC SUB myForm_Click()
'click not exists in form object
PRINT "receive an Click"
END
PUBLIC SUB myForm_Resize()
PRINT "form is resized"
END
PUBLIC SUB myForm_Close()
PRINT "form is now closed"
END
PUBLIC SUB myTimer_Timer()
PRINT "The timer is there"
END
----------------------------------------------------------------
More information about the User
mailing list