[Gambas-user] strange behaviour property visible
Doriano Blengino
doriano.blengino at ...1909...
Tue Nov 17 10:49:56 CET 2009
Jean-Yves F. Barbier ha scritto:
> gb 2.17 debian sid
> ==================
>
> Hi,
>
> I've got something strange: if I don't add a wait line between
> a visible property and a call, it don't work at all:
>
> PUBLIC SUB btnOk_Click()
> MDB.MyHost = txtbHost.Text
> MDB.MyDB = txtbDB.Text
> MDB.MyUsr = txtbLogin.Text
> MDB.MyPass = txtbPass.Text
> IF MDB.DBConnect() THEN
> lblWait.Visible = TRUE
> WAIT 0.01 ' mandatory otherwise lblWait don't appear
> MDB.Fill_DB_Tree()
> lblWait.Visible = FALSE
> ME.Close
> ENDIF
> END
>
>
It is not strange - it is simply normal.
Screen refresh is done in the main loop (every graphical application
does so, even in other OSes), so you will not see screen changes when
your code is running an event handler. If you really want, you put a
WAIT (may be without parameters: in this case it only calls the main
loop, which updates the screen, with no added delay).
Regards,
Doriano
More information about the User
mailing list