
because buttons 1 and 3 that have pngs (or bitmaps) don't behave like the number 5
I have seen that when a button is disabled if it has a png or a bitmap it does not behave
as when it does not have the bitmap (or png), i.e. when it is disabled it assumes a darker color than the button without bitmpas
this my test
Code: Select all | Expand
#include "Fivewin.ch"
Function test
local oDlg
local oBtn:=array(6),nI
local oCursorBtn :=TCursor():New(,'HAND')
DEFINE DIALOG oDlg ;
TITLE "Test btnbmp enable/disable" ;
SIZE 400,400 PIXEL TRUEPIXEL ;
COLOR CLR_BLACK, nRgb( 245,244,234) TRANSPARENT
@ 10,10 BTNBMP obtn[1] ;
FLAT SIZE 120, 30 OF oDlg PIXEL ;
COLOR CLR_BLACK,nRgb(238,236,219) ;
PROMPT "Pieno.png" NOROUND;
BITMAP "pieno.png" LEFT
@ 10,200 BTNBMP obtn[2] ;
FLAT SIZE 120, 30 OF oDlg PIXEL ;
COLOR CLR_BLACK,nRgb(238,236,219) ;
PROMPT "Pieno.png" NOROUND;
BITMAP "pieno.png" LEFT
@ 120,10 BTNBMP obtn[3] ;
FLAT SIZE 120, 30 OF oDlg PIXEL ;
COLOR CLR_BLACK,nRgb(238,236,219) ;
PROMPT "vuoto.png" NOROUND;
BITMAP "vuoto.png" LEFT
@ 120,200 BTNBMP obtn[4] ;
FLAT SIZE 120, 30 OF oDlg PIXEL ;
COLOR CLR_BLACK,nRgb(238,236,219) ;
PROMPT "VUOTO.png" NOROUND;
BITMAP "vuoto.png" LEFT
@ 200,10 BTNBMP obtn[5] ;
FLAT SIZE 120, 30 OF oDlg PIXEL ;
COLOR CLR_BLACK,nRgb(238,236,219) ;
PROMPT "disable senza png" NOROUND;
LEFT
@ 200,200 BTNBMP obtn[6] ;
FLAT SIZE 120, 30 OF oDlg PIXEL ;
COLOR CLR_BLACK,nRgb(238,236,219) ;
PROMPT "enable senza png" NOROUND;
LEFT
for nI=1 to 6
obtn[nI]:bClrGrad = { | lInvert | If( ! lInvert,;
{ { 1, RGB( 225, 225, 225 ), RGB( 225, 225, 225 ) } },;
{ { 1, RGB( 229,241,251 ), RGB( 229,241,251 ) } } ) }
obtn[nI]:nClrBorder := nRgb(218,214,179)
obtn[nI]:oCursor:= oCursorBtn
next
ACTIVATE DIALOG oDlg center;
ON INIT (obtn[1]:disable(),obtn[3]:disable(),obtn[5]:disable())
return nil
Pieno.png

Vuoto.png
