how to change tsbutton bmp background color ?

Post Reply
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

how to change tsbutton bmp background color ?

Post 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
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post 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
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Post 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
User avatar
Taiwan
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan
Contact:

Post 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
Post Reply