1. Progress bar in win32 lib

------=_NextPart_000_0006_01BFAADD.B4E40540
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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.

------=_NextPart_000_0006_01BFAADD.B4E40540
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dwindows-1252" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.2800" name=3DGENERATOR></HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Watch out for this bug! Progress bars do not work =
correctly if=20
they are not created LAST in your program for some strange reason, what =
happens=20
is that if manually set the progress amount (say 50 out of 100) it =
colors in=20
only about 20% of the actual bar... but if you create the progress bar =
after all=20
of your other controls it functions correctly.</FONT></DIV>
<DIV>&nbsp;</DIV>

------=_NextPart_000_0006_01BFAADD.B4E40540--

new topic     » topic index » view message » categorize

2. 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 message » categorize

3. Re: Progress bar in win32 lib

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 message » categorize

4. Re: Progress bar in win32 lib

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 message » categorize

5. Re: Progress bar in win32 lib

Not that it makes any difference, but setScrollRange() for progressbars is
incorrect.
Should be:
    elsif window_type[id] = ProgressBar then
        if not sendMessage( id, PBM_SETRANGE, 0, pack_word( min, max ) ) then

...not... ( PBM_SETRANGE,True...

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu