From: Stefan L on
Hi,
I'm trying to change colour on a progressbas in a window but no
sucess.

METHOD Init(oParent,uExtra) CLASS MFR
.....
oDCProgressBar1 :=
ProgressBar{SELF,ResourceID{MFR_PROGRESSBAR1,_GetInst()}}
oDCProgressBar1:HyperLabel :=
HyperLabel{#ProgressBar1,NULL_STRING,NULL_STRING,NULL_STRING}
....

METHOD PostInit(oParent,uExtra) CLASS MFR
.....
SELF:oDCProgressBar1:BarColor := Color{255,0,0} // Red.
SELF:oDCProgressBar1:BackgroundColor := Color{0,0,0} // Black

But the progressbar is still white background and green bar colour. I
use XP and VO 2.8 SP3

Stefan
From: Stefan L on
On 31 Juli, 18:48, Stefan L <s...(a)proffs.org> wrote:
> Hi,
> I'm trying to change colour on a progressbas in a window but no
> sucess.
>
> METHOD Init(oParent,uExtra) CLASS MFR
> ....
> oDCProgressBar1 :=
> ProgressBar{SELF,ResourceID{MFR_PROGRESSBAR1,_GetInst()}}
> oDCProgressBar1:HyperLabel :=
> HyperLabel{#ProgressBar1,NULL_STRING,NULL_STRING,NULL_STRING}
> ...
>
> METHOD PostInit(oParent,uExtra) CLASS MFR
> ....
> SELF:oDCProgressBar1:BarColor := Color{255,0,0} // Red.
> SELF:oDCProgressBar1:BackgroundColor := Color{0,0,0} // Black
>
> But the progressbar is still white background and green bar colour. I
> use XP and VO 2.8 SP3
>
> Stefan

Tested this in VO 2.7b too and got the same result.
From: Stephen Quinn on
Stefan

Background colours usually use a Brush.
Eg
SELF:oDCProgressBar1:BackgroundColor := BRUSH{ Color{0,0,0} } // Black

No guarantees that fixes the problem though<g>

CYA
Steve


From: Stefan L on
Hi Steve,
Thanks for your input but it gives an error:
Error Code: 16 [ NO EXPORTED VARIABLE ]
Subsystem: BASE
Function: IVARGET
Argument: COLORREF

Stefan

On 31 Juli, 20:17, "Stephen Quinn" <stevej...(a)bigpondSPAM.net.au>
wrote:
> Stefan
>
> Background colours usually use a Brush.
> Eg
>     SELF:oDCProgressBar1:BackgroundColor := BRUSH{ Color{0,0,0} } // Black
>
> No guarantees that fixes the problem though<g>
>
> CYA
> Steve


From: Urs Eggmann on
Hi Stefan,

Normally the progressbar is white and blue. If yours is green, I guess that
somewhere is a colorcondition that overrides your postinit. Your
PostInit-code works here without problems.

regards
Urs



"Stefan L" <sl(a)proffs.org> schrieb im Newsbeitrag
news:c1f3af79-9e9e-40c5-996c-efeaca3e0391(a)w12g2000yqj.googlegroups.com...
> Hi,
> I'm trying to change colour on a progressbas in a window but no
> sucess.
>
> METHOD Init(oParent,uExtra) CLASS MFR
> ....
> oDCProgressBar1 :=
> ProgressBar{SELF,ResourceID{MFR_PROGRESSBAR1,_GetInst()}}
> oDCProgressBar1:HyperLabel :=
> HyperLabel{#ProgressBar1,NULL_STRING,NULL_STRING,NULL_STRING}
> ...
>
> METHOD PostInit(oParent,uExtra) CLASS MFR
> ....
> SELF:oDCProgressBar1:BarColor := Color{255,0,0} // Red.
> SELF:oDCProgressBar1:BackgroundColor := Color{0,0,0} // Black
>
> But the progressbar is still white background and green bar colour. I
> use XP and VO 2.8 SP3
>
> Stefan