How to change de colortext of oBar in runtime?

How to change de colortext of oBar in runtime?

Postby FranciscoA » Wed Oct 06, 2010 3:33 pm

How I can do to change the colortext of ButtonBar in runtine?
I have the following function.
It change perfectly the ButtonBar and his buttons colors, but not the button color-text.
I Traid this...

Function Color_oBar(oBar,cColor)
local n
DEFAULT cColor := NIL
IF !cColor = NIL
if cColor = "ORO"
oBar:bClrGrad := { | lInvert | If( ! lInvert, ;
{ { 1.00,14481663,38075 }, ;
{ 1.00,38075,14481663 } }, ;
{ { 0.10,16777215,9363707 },;
{ 0.10,9363707,16777215 } } ) }
oBar:nClrText := 0

elseif cColor = "NOCHE"
oBar:bClrGrad := { | lInvert | If( ! lInvert, ;
{ { 0.70,0,12429486 },;
{ 0.70,12429486,0 } },;
{ { 0.40,9928844,12429486 },;
{ 0.40,12429486,9928844 } } ) }
oBar:nClrText := 521724

endif
ENDIF
for n:= 1 to len(oBar:aControls)
oBar:aControls[n]:Refresh() //.or. Paint() not work
next
oBar:Refresh() // work
Return nil

Thanks in advance.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: How to change de colortext of oBar in runtime? (SOLVED)

Postby FranciscoA » Wed Oct 06, 2010 4:24 pm

SOLVED...!!!:
...
...

oBar:bClrGrad := { | lInvert | If( ! lInvert, ;
{ { 0.70,0,12429486 },;
{ 0.70,12429486,0 } },;
{ { 0.40,9928844,12429486 },;
{ 0.40,12429486,9928844 } } ) }
nClrTexto := 521724

for n:= 1 to len(oBar:aControls)
oBar:aControls[n]:nClrText := nClrTexto
oBar:aControls[n]:Refresh()
next
oBar:Refresh()
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 84 guests