how to change tsbutton bmp background color ?

how to change tsbutton bmp background color ?

Postby ShumingWang » Mon Nov 20, 2006 8:09 am

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

Postby RAMESHBABU » Mon Nov 20, 2006 1:30 pm

Mr.ShumingWang

This is the code:

Code: Select all  Expand view

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

Postby ShumingWang » Mon Nov 20, 2006 3:19 pm

The text color could be changed, but bmp color seems could not be changed,as a tsbutton contians text and bmp.

Shuming Wang
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Postby Taiwan » Tue Nov 21, 2006 2:23 am

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


Return to FiveWin for Harbour/xHarbour

Who is online

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

cron