Possible to show Metrobuttons disabled like Btnbmp ?

Possible to show Metrobuttons disabled like Btnbmp ?

Postby ukoenig » Sat Nov 12, 2016 9:08 pm

Hello,

is it possible to show METROBUTTONS disabled like BtnBmp ?

I can disable a metrobutton, but the color is still the same.
As a solution I changed the buttoncolor like

DEFINE METROBUTTON oSBtn[71] OF oMenu2 ;
COLOR aVal[76], aVal[75] ;
FONT oTileFont ;
CAPTION "Benutzer" ;
ALIGN "TOPLEFT" ;
GROUP 1 ;
BITMAP c_Pfad1 + "Login.bmp" ;
BMPALIGN "MIDDLECENTER" ;
SIZE 50, 50 ;
BODYTEXT "Passwort" ;
TEXTALIGN "BOTTOMCENTER" ;
TEXTFONT oTileFont ;
ACTION LOGIN1()
oSBtn[71]:nClrCaption := aVal[77]
oSBtn[71]:bMMoved = { | nRow, nCol, nFlags | SHOW_FRAME( oSBtn, 71, nOld ), nOld := 71 }
IF aVal[131] = .F.
oSBtn[71]:Disable()
oSBtn[71]:SetColor(12632256, 12632256)
ENDIF

Image

regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Possible to show Metrobuttons disabled like Btnbmp ?

Postby ukoenig » Mon Nov 14, 2016 10:15 am

Hello,

if it is impossible to show a disabled button-style,
I will change the button-image instead of the color,
but better a BLUR-effect if disabled.

IF aVal[131] = .F. // from USER-login
oSBtn[63]:Disable()
oSBtn[63]:SetBitmap(c_Pfad1 + "Stop.bmp")
ENDIF

Image

regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 28 guests