Re: Progress bar in win32 lib

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

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.

-----Original Message-----
From: wolfgang fritz <wolfritz at KING.IGS.NET>
To: EUPHORIA at LISTSERV.MUOHIO.EDU <EUPHORIA at LISTSERV.MUOHIO.EDU>
Date: Thursday, April 20, 2000 5:23 PM
Subject: Re: Progress bar in win32 lib


>Note that progress bars actually work in a 'block' mode..
>i.e. -- what gets filled *will* depend on it's defined size.
>For example:
>PBar  = create(ProgressBar,"",Win,5,10,93,15,0),
>PBar2 = create(ProgressBar,"",Win,5,35,123,20,0),
>PBar3 = create(ProgressBar,"",Win,5,65,163,25,0)
>...will all show exactly 10 'blue' blocks when they are *full*.
>So if you:
>setScrollPos(PBar_above,50)
>...it will fill half-way for all the different sizes.
>There is not necessarily any half-way if you haven't defined its displayed
>size correctly.
>-----------------------------------------------------------
>Watch out for this bug! Progress bars do not work correctly if they are not
>created LAST in your program for some strange reason, what happens is that
if
>manually set the progress amount (say 50 out of 100) it colors in only
about
>20% of the actual bar... but if you create the progress bar after all of
your
>other controls it functions correctly.
>
>Pete King.
>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu