Re: Progress bar in win32 lib

new topic     » goto parent     » topic index » view thread      » older message » newer message

You are right, and to make it more interesting, try moving the
setScrollRange() down like I did here. It works again, as expected, even
though the bar is not defined last ???

include win32lib.ew
without warning
constant
main_window=create(Window,"",0,0,0,640,450,0),
progress_bar= create (ProgressBar,"",main_window,10,200,400,20,0),
mydummybutton=create(PushButton,"Hi !",main_window,10,300,400,20,0)
setScrollRange (progress_bar,1,100)
setScrollPos (progress_bar,50)
WinMain(main_window,Normal)

> This is what I did, pasted from my setup code:
>
>         progress_bar= create (ProgressBar, "", main_window,
> scr_width/2-200,scr_height-160, 400, 20, 0)
>         setScrollRange (progress_bar, 1,100)
>         --a comment
>         setScrollPos (progress_bar, 50)
>
> insert it into a window, run it, and half the bar is filled like it should
> be.
>
> now try inserting another control in the comment, using the create command,
> run it again and you will see what i am on about.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu