Button disabled looks different on folder and buttonbar

Button disabled looks different on folder and buttonbar

Postby ukoenig » Mon Nov 14, 2016 11:14 am

Hello,

Working on a use-login-system I noticed some problems
Why disabled buttons are showing with a different look ?

In case it is not possible to show the normal disabled-style of BTNBMP inside a buttonbar,
I have to change the image like in metrobuttons ( disabled ) and using a NIL-action

Image

A sample-button needs to be shown DISABLED ( used on a BUTTONBAR )

Code: Select all  Expand view  RUN

@ 5, 710 BTNBMP oBBtn[17] OF oBar ;
SIZE 82, 72 PIXEL ;
BORDER ;
PROMPT "&Speichern" ;
FILENAME c_Pfad1 + "Save.Bmp" ;
ACTION ( lSpeichern := .T., ;
                  DBSELECTAREA( cMonat ), ;
                  V_SAVE(nPage, cMonat), ;
                  oBrw1:Refresh(), oDatP[74]:Refresh(), ;
          oBrw2:Refresh(), ;
          V_GET(cMonat), ;
          oFld:aDialogs[ nPage ]:Update() ) ;
FONT oFontSys  ;
TOP
oBBtn[17]:bClrGrad := { | lMouseOver | If( ! lMouseOver,;
        { { aVal[112], aVal[110], aVal[111] }, ;
        { aVal[112], aVal[111], aVal[110] } }, ;
        { { aVal[116], aVal[114], aVal[115] }, ;
        { aVal[116], aVal[115], aVal[114] } } ) }
oBBtn[17]:cToolTip =  { "Datensatz" + CRLF + "Speichern","SPEICHERN", 1, CLR_BLACK, 14089979 }
oBBtn[17]:SetColor( 0, )
 


regards
Uwe :?:
Last edited by ukoenig on Mon Nov 14, 2016 1:11 pm, edited 1 time in total.
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: Button disabled looks different on folder and buttonbar

Postby nageswaragunupudi » Mon Nov 14, 2016 12:24 pm

Disabled look of TBtnBmp should be the same whether it is on window, buttonbar, or on a folder.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Button disabled looks different on folder and buttonbar

Postby ukoenig » Mon Nov 14, 2016 1:14 pm

I added BtnBmp to a existing sample < TESTBTB.prg >with the same effect

Image

Code: Select all  Expand view  RUN

#include "fivewin.ch"

procedure main()
local oDlgw
local oBot01, oBot02, oBot03, oBot04
local lWhen := .f.
local oFont
local oBar, oBotBar1, oBotBar2, oBotBar3, oBotBar4, oBotBar5, oBotBar6, oBotBar7, oBotBar0
local ahOver := PalBmpRead( , "..\bitmaps\butt1upL.bmp" )
local ahOldBmp := array( 2 )
local bGrad

bGrad := { | lInvert | If( lInvert, ;
      { { 1/2, nRGB( 219, 230, 244 ), nRGB( 207-50, 221-25, 255 ) }, ;
        { 1/2, nRGB( 201-50, 217-25, 255 ), nRGB( 231, 242, 255 ) }  ;
      }, ;
      { { 1/2, nRGB( 219, 230, 244 ), nRGB( 207-50, 221-25, 255 ) }, ;
        { 1/2, nRGB( 201-50, 217-25, 255 ), nRGB( 231, 242, 255 ) }  ;
      } ) }


SetBalloon( .t. )

DEFINE window oDlgw TITLE "Test BTNBMP" from 0,0 to 600,750 pixel

define buttonbar oBar of oDlgw size 110, 40 2007

define font oFont name "ARIAL" size -10,0

  define button oBotBar0 of oBar file "..\bitmaps\off.bmp","..\bitmaps\on.bmp","..\bitmaps\dis.bmp","..\bitmaps\ene.bmp" PROMPT "Files" left
 
  define button oBotBar1 of oBar file "..\bitmaps\off.bmp", "..\bitmaps\on.bmp",nil,"..\bitmaps\ene.bmp" ;
  tooltip "USO ::lBoxSelect DESACTIVADO"
 
  define button oBotBar2 of oBar file "..\bitmaps\off.bmp", "..\bitmaps\on.bmp",nil,"..\bitmaps\ene.bmp" noborder;
  tooltip "USO ::lBoxSelect ACTIVADO"

  define button oBotBar3 of oBar file "..\bitmaps\butt1upD.bmp", "..\bitmaps\butt1do.bmp",nil,"..\bitmaps\butt1upL.bmp" noborder;
  tooltip "USO ::lBoxSelect DESACTIVADO"

//----------- TESTING DISABLED -----------

  define button oBotBar4 of oBar file "..\bitmaps\cara.bmp" adjust;
  tooltip "Con ADJUST"

 // Works

  @ 0, 570 BTNBMP oBotBar5 OF oBar ;
  SIZE 60, 40 PIXEL ;
  BORDER ;
  PROMPT "E&nd" ;
  FILENAME "..\bitmaps\cara.bmp"  

 // doesn*t work

  @ 0, 650 BTNBMP oBotBar6 OF oBar ;
  SIZE 60, 40 PIXEL ;
  BORDER ;
  PROMPT "E&nd" ;
  FILENAME "..\bitmaps\cara.bmp"  

  oBotBar4:Disable() // works

  oBotBar6:Disable() // doesn*t work

// -----------

  oBotBar0:bClrGrad := { | lInvert | If( lInvert, ;
      { { 1/3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
        { 2/3, nRGB( 255, 215,  84 ), nRGB( 255, 233, 162 ) }  ;
      }, ;
      { { 1/2, nRGB( 219, 230, 244 ), nRGB( 207-50, 221-25, 255 ) }, ;
        { 1/2, nRGB( 201-50, 217-25, 255 ), nRGB( 231, 242, 255 ) }  ;
      } ) }

  oBotBar1:bClrGrad := bGrad
  oBotBar2:bClrGrad := bGrad
  oBotBar3:bClrGrad := bGrad
 

  oBotBar1:lBoxSelect := .f.
  oBotBar3:lBoxSelect := .f.

  @ 100, 5 BTNBMP oBot01 OF oDlgw SIZE 200, 70 WHEN lWhen ;
   font oFont file "..\bitmaps\off.bmp", "..\bitmaps\on.bmp","..\bitmaps\DIS.BMP" right
 
  @ 250, 5 BTNBMP oBot02 OF oDlgw SIZE 200, 70 noborder ADJUST TRANSPARENT;
  file  "..\bitmaps\butt1upD.bmp", "..\bitmaps\butt1do.bmp",nil,"..\bitmaps\butt1upL.bmp" font oFont;
  action ( if( (lWhen := !lWhen), oBot01:SetText( "&Test" ), oBot01:SetText( "" ) ), oBot01:refresh() );
  tooltip "Presione para Activar/Desactivar Boton Anterior"

  @ 350, 5 BTNBMP oBot03 OF oDlgw SIZE 90, 70 noborder ;
  file  "..\bitmaps\butt3up.bmp", "..\bitmaps\butt3do.bmp" adjust tooltip "Activa/Descativa 1er boton de la barra";
  action ( if ( ! IsWindowEnabled( oBotBar0:hWnd ), oBotBar0:enable(), oBotBar0:disable() ) )

  @ 450, 5 BTNBMP oBot04 PROMPT "Test &2" OF oDlgw SIZE 200, 70 WHEN lWhen ;
  file  "..\bitmaps\butt2up.bmp", "..\bitmaps\butt2do.bmp", "..\bitmaps\dis.bmp" adjust font ofont

  oBot02:bGotFocus := {|| ahOldBmp[ 1 ] := oBot02:hBitmap1, ;
                          ahOldBmp[ 2 ] := oBot02:hPalette1,;
                          oBot02:hBitmap1 := ahOver[ 1 ],;
                          oBot02:hPalette1 := ahOver[ 2 ],;
                          oBot02:refresh() }
                         
  oBot02:bLostFocus := {||oBot02:hBitmap1 := ahOldBmp[ 1 ],;
                          oBot02:hPalette1 := ahOldBmp[ 2 ],;
                          afill( ahOldBmp, NIL ),;
                          oBot02:refresh() }

  oBot01:SetColor( CLR_BLACK, CLR_CYAN )
 
ACTIVATE window oDlgw on init oBot02:setfocus()

return
 
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: Button disabled looks different on folder and buttonbar

Postby ukoenig » Wed Mar 01, 2017 3:22 pm

Btnbmp disabled on folderpages
is showing only a grey area

open a dialog NOWAIT I need the button shown DISABLED
and ENABLE again on dialog close.

Image

any idea ?

regards
Uwe :?:
Last edited by ukoenig on Wed Mar 01, 2017 5:58 pm, edited 1 time in total.
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: Button disabled looks different on folder and buttonbar

Postby Rick Lipkin » Wed Mar 01, 2017 5:24 pm

Uwe

You don't need to define a second ( disabled ) bitmap parameter ... just use your current bitmap and FiveWin manages the Disabled parameter.

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Button disabled looks different on folder and buttonbar

Postby ukoenig » Wed Mar 01, 2017 5:39 pm

Rick,

there is NO extra bitmap.
After calling the dialog ( NOWAIT ), STEUER_B(oBtn2), the button is disabled.

REDEFINE BTNBMP oBtn2 OF oFld:aDialogs[ 1 ] ;
ID 210 PIXEL ;
BORDER ;
PROMPT " &Steuer " + " Berater " ;
FILENAME c_Pfad1 + "Excel1.Bmp" ;
ACTION ( STEUER_B(oBtn2), oBtn2:Disable() , DBSELECTAREA(cMUmsName) ) ;
FONT oFontSys ;
LEFT
oBtn2:bClrGrad := { | lMouseOver | If( ! lMouseOver,;
{ { aVal[112], aVal[110], aVal[111] }, ;
{ aVal[112], aVal[111], aVal[110] } }, ;
{ { aVal[116], aVal[114], aVal[115] }, ;
{ aVal[116], aVal[115], aVal[114] } } ) }
oBtn2:cToolTip = { "Steuer-berater" + CRLF + "Daten","STEUERBERATER", 1, CLR_BLACK, 14089979 }
oBtn2:SetColor( 0, )

------------------------------------------

I found the reason : it doesn't work using defined colors with oBtn2:bClrGrad
I changed to style 2007 :

REDEFINE BTNBMP oBtn2 OF oFld:aDialogs[ 1 ] ;
ID 210 PIXEL 2007 ;
BORDER ;

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: Button disabled looks different on folder and buttonbar

Postby Rick Lipkin » Wed Mar 01, 2017 9:48 pm

Uwe

I use 2007 as well .. then add the Gradient as the last parameter .. doing it much like you but I use the GRADIENT parameter instead of the gradient codeblock..

Code: Select all  Expand view  RUN

REDEFINE BTNBMP oBTN1 ID 113           ;
       RESOURCE "ADD16" ;
       PROMPT "&Add" LEFT 2007;
       ACTION ( _UserView( "A",oRsUser,oBtn1,oBtn2,oBtn3,oBtn4,oBtn5,oBtn6 ),; // add
                oLBX:ReFresh(),( oLbx:SetFocus(), .F. ) ) ;
       GRADIENT GreyButtonGrad()
 

Code: Select all  Expand view  RUN

//-------------------
Func GreyButtonGrad()

// 2010 grey button skin

Local bGrad

bGrad := { | lInvert | If( ! lInvert, ;
         { { 1, nRGB( 255, 255, 255 ), nRGB( 207, 207, 207 ) } }, ;
         { { 1/3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
         { 2/3, nRGB( 255, 215,  84 ), nRGB( 255, 233, 162 ) } } ) }

Return( bGrad )
 


Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Button disabled looks different on folder and buttonbar

Postby nageswaragunupudi » Thu Mar 02, 2017 3:24 am

Mr Uwe

Please add 2007 clause to all BTNBMP defines and see. You should be able to see grayed bitmaps. Also add GDIP clause for better grayed painting.

I confirm that grayed bitmap painting is not working on BtnBmp whether on buttonbar or outside
a) when large images are used ( which need to be resized to fit the button size).
and
(b) when not having 2007 (or 2010,etc) styles. We shall look into the issue and resolve it.

Till then if you are using larger images, please add 2007 clause to all btnbmps whether or not you assign your own gradients.
I also advise using GDIP clause for better gray painting.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Button disabled looks different on folder and buttonbar

Postby nageswaragunupudi » Thu Mar 02, 2017 9:30 am

Test program:
Code: Select all  Expand view  RUN
#include "fivewin.ch"

function Main()

   local oDlg, oFont, oBtn, oFld
   local cBmpFile    := "c:\fwh\bitmaps\32x32\quit.bmp"
   local cBmpLarge   := "c:\fwh\bitmaps\alphabmp\android.bmp"
   local cBmpFull    := "c:\fwh\bitmaps\olga1.jpg"

   DEFINE FONT oFont NAME "TAHOA" SIZE 0,-14 BOLD
   DEFINE DIALOG oDlg SIZE 800,700 PIXEL TRUEPIXEL FONT oFont ;
      TITLE "PAINTING GRAY BUTTONS"

   @  20,100 SAY "NORMAL" SIZE 160,20 PIXEL OF oDlg CENTER
   @  20,270 SAY "2007"   SIZE 160,20 PIXEL OF oDlg CENTER
   @  20,440 SAY "2007 & GDI+" SIZE 160,20 PIXEL OF oDlg CENTER

   @ 120, 00 SAY "NORMAL" + CRLF + "SIZE" + CRLF + "BITMAPS"      SIZE 100,60 PIXEL OF oDlg CENTER
   @ 310, 00 SAY "LARGE" + CRLF + "BITMAPS" + CRLF + "RESIZED"    SIZE 100,60 PIXEL OF oDlg CENTER
   @ 500, 00 SAY "FULLSIZE" + CRLF + "IMAGES" + CRLF + "RESIZED"  SIZE 100,60 PIXEL OF oDlg CENTER

   @  60,100 BTNBMP oBtn PROMPT "Enabled"  FILE cBmpFile    LEFT SIZE 160,80 PIXEL OF oDlg
   @ 150,100 BTNBMP oBtn PROMPT "Disabled" FILE cBmpFile    LEFT SIZE 160,80 PIXEL OF oDlg WHEN .F.

   @  60,270 BTNBMP oBtn PROMPT "Enabled"  FILE cBmpFile    LEFT SIZE 160,80 PIXEL OF oDlg 2007
   @ 150,270 BTNBMP oBtn PROMPT "Disabled" FILE cBmpFile    LEFT SIZE 160,80 PIXEL OF oDlg 2007 WHEN .F.

   @  60,440 BTNBMP oBtn PROMPT "Enabled"  FILE cBmpFile    LEFT SIZE 160,80 PIXEL OF oDlg 2007 GDIP
   @ 150,440 BTNBMP oBtn PROMPT "Disabled" FILE cBmpFile    LEFT SIZE 160,80 PIXEL OF oDlg 2007 GDIP WHEN .F.

   @ 250,100 BTNBMP oBtn PROMPT "Enabled"  FILE cBmpLarge    LEFT SIZE 160,80 PIXEL OF oDlg
   @ 340,100 BTNBMP oBtn PROMPT "Disabled" FILE cBmpLarge    LEFT SIZE 160,80 PIXEL OF oDlg WHEN .F.

   @ 250,270 BTNBMP oBtn PROMPT "Enabled"  FILE cBmpLarge    LEFT SIZE 160,80 PIXEL OF oDlg 2007
   @ 340,270 BTNBMP oBtn PROMPT "Disabled" FILE cBmpLarge    LEFT SIZE 160,80 PIXEL OF oDlg 2007 WHEN .F.

   @ 250,440 BTNBMP oBtn PROMPT "Enabled"  FILE cBmpLarge    LEFT SIZE 160,80 PIXEL OF oDlg 2007 GDIP
   @ 340,440 BTNBMP oBtn PROMPT "Disabled" FILE cBmpLarge    LEFT SIZE 160,80 PIXEL OF oDlg 2007 GDIP WHEN .F.

   @ 440,100 BTNBMP oBtn PROMPT "Enabled"  FILE cBmpFull    LEFT SIZE 160,80 PIXEL OF oDlg
   @ 530,100 BTNBMP oBtn PROMPT "Disabled" FILE cBmpFull    LEFT SIZE 160,80 PIXEL OF oDlg WHEN .F.

   @ 440,270 BTNBMP oBtn PROMPT "Enabled"  FILE cBmpFull    LEFT SIZE 160,80 PIXEL OF oDlg 2007
   @ 530,270 BTNBMP oBtn PROMPT "Disabled" FILE cBmpFull    LEFT SIZE 160,80 PIXEL OF oDlg 2007 WHEN .F.

   @ 440,440 BTNBMP oBtn PROMPT "Enabled"  FILE cBmpFull    LEFT SIZE 160,80 PIXEL OF oDlg 2007 GDIP
   @ 530,440 BTNBMP oBtn PROMPT "Disabled" FILE cBmpFull    LEFT SIZE 160,80 PIXEL OF oDlg 2007 GDIP WHEN .F.

   ACTIVATE DIALOG oDlg CENTERED ON PAINT ( ;
      oDlg:Line(  50,00, 50,800 ), ;
      oDlg:Line( 240,00,240,800 ), ;
      oDlg:Line( 430,00,430,800 )  )

   RELEASE FONT oFont

return nil

//----------------------------------------------------------------------------//
 


Image

The problem is with non-2007 style buttons with larger images requiring resizing.
Also grayed text is not visible on some backgrounds.

The behavior is the same on buttonbars, windows, dialogs and folders/folderex.

We shall fix these asap.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Button disabled looks different on folder and buttonbar

Postby nageswaragunupudi » Thu Mar 02, 2017 1:12 pm

Fixed and the fix is available in FWH 17.03.
Results after fixing

Image

Using GDIP clause has a definite advantage.

This fix can be applied to earlier versions of btnbmp.prg.
Please locate the following code towards the end of METHOD PaintBitmap()
Code: Select all  Expand view  RUN
  // following  3 lines are important for backward compatibility 2015-02-29
   if lGray .and. !( ::l2007 .or. ::l2010 .or. ::l2013 .or. ::l2015 )
      BtnDisable( ::hWnd, ::hDC )
   endif
 


Please substitute these lines with this revised code:
Code: Select all  Expand view  RUN
  // following  3 lines are important for backward compatibility 2015-02-29
   // Lines 2 to 4 in the condition are added 2017-03-02 : FWH 17.03

   if lGray .and. !( ::l2007 .or. ::l2010 .or. ::l2013 .or. ::l2015 ) .and. ;
      ! ::lGDIP .and. ;
      ( GetBmpHeight( ::hBmp ) <= ( aBmpRect[ 3 ] - aBmpRect[ 1 ] ) .and. ;
        GetBmpWidth(  ::hBmp ) <= ( aBmpRect[ 4 ] - aBmpRect[ 2 ] ) )
      BtnDisable( ::hWnd, ::hDC )
   endif
 


Please apply the fix and check the results.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Button disabled looks different on folder and buttonbar

Postby Rick Lipkin » Thu Mar 02, 2017 2:14 pm

Rao

Is the use of PIXEL needed with the GDIP clause ?
Code: Select all  Expand view  RUN

@ 440,440 BTNBMP oBtn PROMPT "Enabled"  FILE cBmpFull    LEFT SIZE 160,80 PIXEL OF oDlg 2007 GDIP
@ 530,440 BTNBMP oBtn PROMPT "Disabled" FILE cBmpFull    LEFT SIZE 160,80 PIXEL OF oDlg 2007 GDIP WHEN .F.
 


What changes would your make for the btnbmp code below ?

Thanks
Rick Lipkin

Code: Select all  Expand view  RUN

REDEFINE BTNBMP oBTN1 ID 113           ;
       RESOURCE "ADD16" ;
       PROMPT "&Add" LEFT 2007;
       ACTION ( _UserView( "A",oRsUser,oBtn1,oBtn2,oBtn3,oBtn4,oBtn5,oBtn6 ),; // add
                oLBX:ReFresh(),( oLbx:SetFocus(), .F. ) ) ;
       GRADIENT GreyButtonGrad()
 

Code: Select all  Expand view  RUN

//-------------------
Func GreyButtonGrad()

// 2010 grey button skin

Local bGrad

bGrad := { | lInvert | If( ! lInvert, ;
         { { 1, nRGB( 255, 255, 255 ), nRGB( 207, 207, 207 ) } }, ;
         { { 1/3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
         { 2/3, nRGB( 255, 215,  84 ), nRGB( 255, 233, 162 ) } } ) }
 
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Button disabled looks different on folder and buttonbar

Postby nageswaragunupudi » Thu Mar 02, 2017 2:54 pm

PIXEL clause is required to indicate that the nRow and nCol values in "@ nRow,nCol" are in pixels.

Your REDEFINE command is okay as it is.
If you prefer GDIP rendering, please add the clause GDIP anywhere in the command.
If we specify the clause GDIP, the image is read and rendered using GDI+.

But before that please apply the fix posted above.

OT:
We need to make our application work with monitors of different resolutions and it is better to code the coordinates and sizes relative to the screen size and orientation than to use Resources.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Button disabled looks different on folder and buttonbar

Postby Silvio.Falconi » Wed Mar 29, 2017 4:52 pm

Mr Nages,
i have a problem to insert the value 2010 or 2013 or 2015
I saw on include I have this
Code: Select all  Expand view  RUN
#xcommand @ <nRow>, <nCol> BTNBMP [<oBtn>] ;
             [ <resource: NAME, RESNAME, RESOURCE> <cResName1> ;
                [,<cResName2>[,<cResName3>[,<cResName4>] ] ] ] ;
             [ <file: FILE, FILENAME, DISK, BITMAP> <cBmpFile1> ;
                [,<cBmpFile2>[,<cBmpFile3>[,<cBmpFile4>] ] ] ] ;
             [ SIZE <nWidth>, <nHeight> ] ;
             [ ACTION <uAction,...> ] ;
             [ <of:OF, WINDOW, DIALOG> <oWnd> ] ;
             [ MESSAGE <cMsg> ] ;
             [ WHEN <uWhen> ] ;
             [ <adjust: ADJUST> ] ;
             [ <lUpdate: UPDATE> ] ;
             [ PROMPT <cPrompt> ] ;
             [ FONT <oFont> ] ;
             [ TOOLTIP <cToolTip> ] ;
             [ <lNoBorder: NOBORDER> ] ;
             [ <lFlat: FLAT> ] ;
             [ <layout: CENTER, TOP, LEFT, BOTTOM, RIGHT> ] ;
             [ <l2007: 2007> ] ;
             [ <lTrans: TRANSPARENT> ] ;
             [ <lNoRound: NOROUND> ];
             [ GRADIENT <bGradColors> ];
             [ COLOR <nClrFore> [,<nClrBack>] ] ;
             [ <pixel: PIXEL> ] ;
             [ <design: DESIGN> ] ;
             [ <lGDIP: GDIP, GDIPLUS> ];
      => ;
         [ <oBtn> := ] TBtnBmp():New( <nRow>, <nCol>, <nWidth>, <nHeight>,;
            <cResName1>, <cResName2>, <cBmpFile1>, <cBmpFile2>,;
            [{|Self|<uAction>}], <oWnd>, <cMsg>, <{uWhen}>, <.adjust.>,;
            <.lUpdate.>, <cPrompt>, <oFont>, [<cResName3>], [<cBmpFile3>],;
            !<.lNoBorder.>, [ Upper(<(layout)>) ], <.l2007.>,[<cResName4>], [<cBmpFile4>], ;
            <.lTrans.>, <cToolTip>, !<.lNoRound.>, <bGradColors>, <.pixel.>, <.design.>, <.lFlat.>, ;
            [<nClrFore>], [<nClrBack>], <.lGDIP.> )


and if I try to set the button with
obtn1:l2015:=.t.
or
obtn1:l2013:=.t.
or
obtn1:l2010 :=.t.

is allways the same color

any solution please ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7072
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 24 guests