FWH 1408-9 BrnBmp Disable() adding grey to bitmap

FWH 1408-9 BrnBmp Disable() adding grey to bitmap

Postby Rick Lipkin » Thu Oct 09, 2014 8:27 pm

Antonio and Rao

Using your latest BtnBmp replacement I have noticed that when you disable a BtnBmp even expressively adding the second and third parameter to the RESOURCE line, the 'disabled ( second image ) ' bitmap does not properly render... it ADDS its own grey properties to the Bitmap.

Code: Select all  Expand view

REDEFINE BTNBMP oBtnClock ID 180 PROMPT cClockText ;
                RESOURCE "CLOCK","DCLOCK","DCLOCK" ;
                ADJUST CENTER NOBORDER  ;
                of oWorkB ;
                ACTION( oLbxB:SetFocus(),nClicks++,;
               _BuildTimer( oBtnClock,cClockText,@nClicks,oWorkB,@oTmr,hDatas)) //,@cTime ) )

 *      oBtnClock:lTransparent := .t.
 *      oBtnClock:SetColor( 0, )
 

not disabled .. Clock.Bmp
Image

Disabled .. DClock.Bmp
Image

Actual dClock.Bmp
Image

As you can see .. I specifically wanted "DCLOCK" as my disabled bitmap ... without any changes. Hopefully there is a quick fix NOT to add any grey desaturation if the second or third parameter is passed on the RESOURCE line.

I replaced the old BtnBmp class and got the desired 'disabled' rendering behavoir.
Image

Just for a test, I changed "DCLOCK" to another 'color' Bitmap and it 'greyed' out the image as well, even though it was in color.

I have noticed that the disabled behavior does desaturate to grey ( unlike previous versions ) , no mater how the Bitmap is colored.

Thank you BOTH for your Help!

Rick Lipkin

ps .. I am overlaying the prompt over the bitmap .. I have rem'd out the prompt and it made no difference.
User avatar
Rick Lipkin
 
Posts: 2634
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: FWH 1408-9 BrnBmp Disable() adding grey to bitmap

Postby nageswaragunupudi » Fri Oct 10, 2014 12:42 am

We shall fix this soon and get back to you
Regards

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

Re: FWH 1408-9 BrnBmp Disable() adding grey to bitmap

Postby nageswaragunupudi » Fri Oct 10, 2014 1:07 am

Please check your email
Regards

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

Re: FWH 1408-9 BrnBmp Disable() adding grey to bitmap

Postby Rick Lipkin » Fri Oct 10, 2014 1:05 pm

Rao

Just got your e-mail, YES ... thank you VERY much!! It appears all my BtnBmps work enabled and disabled.. some Prompt spacing that I have padded with spaces, is offset a bit, but I can fix that by modifying some of the spacing ..

Code: Select all  Expand view

PROMPT "&Cancel   " LEFT 2007
PROMPT "&Cancel" LEFT 2007
 


No big deal .. that might come up in 1409 from some developers who re-compile their programs.

Thanks
Rick Lipkin

Old
Image

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

Re: FWH 1408-9 BrnBmp Disable() adding grey to bitmap

Postby nageswaragunupudi » Fri Oct 10, 2014 1:49 pm

I suggest you do not pad. It is not needed now.
In this case, to include painting of extra spaces, the width available (on the basis of the size of the button and size of bitmap ) one row is not enough. Therefore the prompt is painted in two lines vertically centered. We do not notice because they are blanks.

If you do not use padding, you will notice t hat the prompts are appropriately aligned and I hope they should also look aesthetically well

But finally the programmer needs to provide adequate space for the prompt itself.
Regards

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 51 guests