Small correction in TBTNBMP Class to paint Disabled BtnText

Small correction in TBTNBMP Class to paint Disabled BtnText

Postby RAMESHBABU » Thu Jan 15, 2015 5:13 am

Mr.Antonio,

I was trying to change the Disabled Button Text Color,
But it is always taking the Disabled Text Color as CLR_HGRAY

Line 1367 in METHOD PaintCaption() CLASS TBtnBmp needs to be
modified as under.

//nClr = If( ::IsEnabled(), ::nClrText, If( ::lDisColor, CLR_HGRAY, ::nClrTextDis ) )
nClr = If( ::IsEnabled(), ::nClrText, If( ::lDisColor, ::nClrTextDis, CLR_HGRAY ) )

Regards,

-Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 616
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Small correction in TBTNBMP Class to paint Disabled BtnText

Postby nageswaragunupudi » Thu Jan 15, 2015 6:49 am

Mr Ramesh Babu

The convention used by FWH is that when :lDisColor == .T. ( default ), the disabled button is painted with "standard disabled color", which is GLR_GRAY. When :lDisColor is set to .F., then the user specified :nClrDisText (by default :nClrText) is used.

This convention is consistent with :lDisColors and :nClrTextDis used in TGet.

We suggest obtn:lDisColor or oget:lDisColors be set to .f. when it is required to paint with programmer specified obtn:nClrDisText or oget:lClrTextDis respectively. Any modification would break the existing code in the presently working software.
Regards

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

Re: Small correction in TBTNBMP Class to paint Disabled BtnText

Postby RAMESHBABU » Thu Jan 15, 2015 3:18 pm

Mr.Rao,

Its my mistake in hurry.

As Usually You are right.

We suggest obtn:lDisColor or oget:lDisColors be set to .f. when it is required to paint with programmer specified obtn:nClrDisText


I have set oget:lDisColors := .f.

Now I am able to Paint the Disabled Text properly.

Thanks,

-Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 616
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 124 guests