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 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user