Basically I want to have a Color of Text Set for events, similar to what cBmpFile1, cBmpFile2, cBmpFile3 and cBmpFile4 do, but even if only one Bmp file is set.
This way, if I set only one BMP, I still have the effect of something changing in the button when an event happens (Button Enabled, Mouse Over, Button Pressed, Button Disabled...
I think METHOD SetColor( nClrText, nClrPane ) can be used for that effect....
I am planning to Update some time the beginning of next year, but I will like to have something done before that, I think the class can be modified rather easily by some one with CLASS programming experience, I will try to do my self, but I don't want to corrupt the class, If someone can help, I think it may be of benefit for everyone.... Thanks!!!
BtnBmp New DATA aPromptClrs
BtnBmp New DATA aPromptClrs
=====>
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...
Re: BtnBmp New DATA aPromptClrs
I was able to obtain what I wanted, harcoding the following lines:
::lCalcColor is a DATA I added to have a diferent color for the button where ::lCalcColor = .t.
It looks great....
I hope it will be SOFTCODED and included in a next Fivewin release before next year, something like
THANKS FOR THAKING THIS UNTO CONSIDERATION...
Code: Select all
254 ::SetColor( If( ValType( ::nClrText ) == "B", Eval( ::nClrText, ::lMOver ), if( !::lMOver .and. !Empty( ::cCaption ), If( ::lCalcColor = .t. , ::nClrText := CLR_BLACK , ::nClrText := CLR_WHITE ), If( ::lPressed .and. !Empty( ::cCaption ) , ::nClrText := CLR_HRED , If( ::lCalcColor = .t. , ::nClrText := CLR_YELLOW , ::nClrText := CLR_HGREEN ) ) ) ), ::nClrPane )
357 ::SetColor( If( ValType( ::nClrText ) == "B", Eval( ::nClrText, ::lMOver ), if( !::lMOver .and. !Empty( ::cCaption ), If( ::lCalcColor = .t. , ::nClrText := CLR_BLACK , ::nClrText := CLR_WHITE ), If( ::lPressed .and. !Empty( ::cCaption ) , ::nClrText := CLR_HRED , If( ::lCalcColor = .t. , ::nClrText := CLR_YELLOW , ::nClrText := CLR_HGREEN ) ) ) ), ::nClrPane )
500 ::SetColor( If( ValType( ::nClrText ) == "B", Eval( ::nClrText, ::lMOver ), if( !::lMOver .and. !Empty( ::cCaption ), If( ::lCalcColor = .t. , ::nClrText := CLR_BLACK , ::nClrText := CLR_WHITE ), If( ::lPressed .and. !Empty( ::cCaption ) , ::nClrText := CLR_HRED , If( ::lCalcColor = .t. , ::nClrText := CLR_YELLOW , ::nClrText := CLR_HGREEN ) ) ) ), ::nClrPane )
1287 If( ValType( ::nClrText ) == "B", Eval( ::nClrText, ::lMOver ), if( !::lMOver .and. !Empty( ::cCaption ), If( ::lCalcColor = .t. , ::nClrText := CLR_BLACK , ::nClrText := CLR_WHITE ), If( ::lPressed .and. !Empty( ::cCaption ) , ::nClrText := CLR_HRED , If( ::lCalcColor = .t. , ::nClrText := CLR_YELLOW , ::nClrText := CLR_HGREEN ) ) ) ), ::hDC,;
1311 If( ValType( ::nClrText ) == "B", Eval( ::nClrText, ::lMOver ), if( !::lMOver .and. !Empty( ::cCaption ), If( ::lCalcColor = .t. , ::nClrText := CLR_BLACK , ::nClrText := CLR_WHITE ) , If( ::lPressed .and. !Empty( ::cCaption ) , ::nClrText := CLR_HRED , If( ::lCalcColor = .t. , ::nClrText := CLR_YELLOW , ::nClrText := CLR_HGREEN ) ) ) ), ::hDC,;
1318 nClr = If( IsWindowEnabled( ::hWnd ), if( !::lMOver .and. !Empty( ::cCaption ), If( ::lCalcColor = .t. , ::nClrText := CLR_BLACK , ::nClrText := CLR_WHITE ), If( ::lPressed .and. !Empty( ::cCaption ) , ::nClrText := CLR_HRED , If( ::lCalcColor = .t. , ::nClrText := CLR_YELLOW , ::nClrText := CLR_HGREEN ) ) ), if( ::lDisColor, CLR_HGRAY, ::nClrTextDis ) )
1172 nClr = If( IsWindowEnabled( ::hWnd ), if( !::lMOver .and. !Empty( ::cCaption ), If( ::lCalcColor = .t. , ::nClrText := CLR_BLACK , ::nClrText := CLR_WHITE ), If( ::lPressed .and. !Empty( ::cCaption ) , ::nClrText := CLR_HRED , If( ::lCalcColor = .t. , ::nClrText := CLR_YELLOW , ::nClrText := CLR_HGREEN ) ) ), if( ::lDisColor, CLR_HGRAY , ::nClrTextDis ) )
It looks great....
I hope it will be SOFTCODED and included in a next Fivewin release before next year, something like
Code: Select all
@ 10, 10 BTNBMP oBtn OF oDialog FILENAME "Boton.bmp" PROMPT "Boton1" PROMPTCOLORS ColorActive, ColorMouseOver, ColorPressed, ColorDissabled FONT oFont1
=====>
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...
Re: BtnBmp New DATA aPromptClrs
Just in case it can be included in FiveWin, I made changes to btnbmp.prg FWH12.04
New Datas:
nClrActive
nClrMouseOver
nClrPressed
nClrDisabled
I sent you the modified class by e-mail...
New Datas:
nClrActive
nClrMouseOver
nClrPressed
nClrDisabled
I sent you the modified class by e-mail...
=====>
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...