I added the Buttonpart for the new Update.
I can switch Styles for BtnBmp between Color, Gradient and Transparent at Runtime,
but cannot switch back to Style 2007. On init, there is no problem.
Maybe a combination needed with :
oBtn1:l2007 := .T.
- Code: Select all Expand view
REDEFINE BTNBMP oBtn1 ID 500 OF oWndBtnB 2007 ;
FILENAME c_path + "\Bitmaps\32Exit.bmp" ;
LEFT ;
PROMPT " &Exit" ;
FONT oTextFont ;
ACTION ( oWndBtnB:End() )
oBtn1:cTooltip := "Test-Button"
...
...
REDEFINE SELEX oSelex12 VAR nBtnStyle5 OF oWndBtnB ID 130 ;
ITEMS "2007", "Grad.","Color", "Transp." ;
GRADIENT OUTTRACK { { 0.5, 16770250, 16312263 }, ;
{ 0.5, 16312263, 16770250 } } ;
GRADIENT INTRACK { { 0.5, 8388608, 16312263 }, ;
{ 0.5, 16312263, 8388608 } } ;
THUMBSIZE 30, 20 ROUNDSIZE 5 ;
COLOR THUMB 14853684 ;
COLORTEXT 128, 32768 ;
TITLE "Button-Style" TOP ;
FONT oFont5 ;
ACTION BTN_SET( oBtn1 ) ;
COLORTITLE 0
...
...
// -------------
FUNCTION BTN_SET( oBtn1 )
oBtn1:SetSize( 217, nBtnHight5, .T. )
// ITEMS "2007", "Grad.","Color", "Transp."
IF nBtnStyle5 = 1 // Doesn't work at Runtime ( only on Init ) !!!!!!!
oBtn1:l2007 := .T.
oBtn1:lTransparent := .F.
ENDIF
IF nBtnStyle5 = 2
oBtn1:l2007 := .T.
oBtn1:bClrGrad = { | lMouseOver | If( ! lMouseOver,;
{ { nMove5, nColor5a, nColor5b }, ;
{ nMove5, nColor5b, nColor5a } },;
{ { nMove5, nColor5a, nColor5b }, ;
{ nMove5, nColor5b, nColor5a } } ) }
ENDIF
IF nBtnStyle5 = 3
oBtn1:l2007 := .T.
oBtn1:bClrGrad = { | lMouseOver | If( ! lMouseOver,;
{ { nMove5, nColor5a, nColor5a }, ;
{ nMove5, nColor5a, nColor5a } },;
{ { nMove5, nColor5a, nColor5b }, ;
{ nMove5, nColor5b, nColor5a } } ) }
ENDIF
IF nBtnStyle5 = 4
oBtn1:l2007 := .F.
oBtn1:lTransparent := .T.
ENDIF
// --------------------
IF nBRound5 = 1
oBtn1:lRound := .T.
ELSE
oBtn1:lRound := .F.
ENDIF
//---------------------
IF nBorder5 = 1
oBtn1:lBorder := .T.
ELSE
oBtn1:lBorder := .F.
ENDIF
oBtn1:Refresh()
RETURN NIL
Best Regards
Uwe