Re: HMG 4 Started
Posted: Tue Aug 17, 2010 7:31 am
Code changing colors should look like:
but, while compiling, I get an error about not found function NTOC
I need simple conversion from numbers to hex to paste color in #RRGGBB format.
Code: Select all
if ValType(::aFontColor) == 'U'
xForeColor := '#000000;'
else
xForeColor := '#'+NtoC(aFontColor[1],16,2)+NtoC(aFontColor[2],16,2)+NtoC(aFontColor[3],16,2)+';'
endif
cStyleSheet += 'color:'+xForeColor + ';'
if ValType(::aBackColor) == 'A'
cStyleSheet += 'background-color:#'+NtoC(aBackColor[1],16,2)+NtoC(aBackColor[2],16,2)+NtoC(aBackColor[3],16,2)+';'
endif
if !empty(cStyleSheet)
::oQTObject:setStyleSheet(cStyleSheet)
endif
I need simple conversion from numbers to hex to paste color in #RRGGBB format.