Page 1 of 1

how to change tsbutton bmp background color ?

Posted: Mon Nov 20, 2006 8:09 am
by ShumingWang
Hi,

redefine tsbutton of odlg resource "mydllbmp" when .f.

The disabled button bmp always shows dark gray, how to change it to CLR_HGRAY ?

Best regard !

Shuming Wang

Posted: Mon Nov 20, 2006 1:30 pm
by RAMESHBABU
Mr.ShumingWang

This is the code:

Code: Select all


         COLORS {|oBtn|IF(oBtn:lActive,                                 ;
                       IF(oBtn:lMouseOver, nRGB(80,145,210), CLR_WHITE),;
                        CLR_GRAY ) },                                  ;
                        {|oBtn| If( oBtn:lActive,                       ;
                        {{CLR_WHITE, nRGB(80,145,210)}, 4 },            ; 
                         CLR_HGRAY ) } ;
         ACTION ( .T. ) 
and the result is :

Image

Regards

- Ramesh Babu P

Posted: Mon Nov 20, 2006 3:19 pm
by ShumingWang
The text color could be changed, but bmp color seems could not be changed,as a tsbutton contians text and bmp.

Shuming Wang

Posted: Tue Nov 21, 2006 2:23 am
by Taiwan
Hello ShumingWang,

I guess TSButton only support Text for Disable function.
You can use it below:

REDEFINE TSButton Of oDlg ;
RESOURCE "1","2","Disable bmp","4"

Regards,

Richard