[Gambas-user] Progress Bar and event?

Daniel Campos dcamposf at ...626...
Mon Dec 24 17:59:28 CET 2007


FOR i = 1 TO 246
    ProgressBar1.Value += 0.004


  ' HERE
  WAIT


NEXT


You need WAIT inside the loop to refresh the interface, may be you
should add a delay, it could be too fast to watch it in that example,
for example WAIT 0.01

Daniel


2007/12/24, lawrence pires <piresl at ...626...>:
> Still pretty new to Gambas, but have been playing with the progress bar, but
> the damm thing only works when triggered by an event.
>
> Heres what i got:
>
> PUBLIC SUB ProgressBar1_GotFocus()
> DIM i AS Integer
>
> ProgressBar1.Visible = TRUE
> WAIT
> FOR i = 1 TO 246
>      ProgressBar1.Value += 0.004
>      ProgressBar1.Refresh
>   NEXT
> ProgressBar1.Visible = FALSE
>
> END
>
> So basically it only works when the mouse is over the progress bar or when i
> left click.
>
> How can I have it working automatically without an event? can someone give
> me an example?
>
> cheers
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list