FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FWH 1408-9 BrnBmp Disable() adding grey to bitmap
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
FWH 1408-9 BrnBmp Disable() adding grey to bitmap
Posted: Thu Oct 09, 2014 08: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 (fw): Select all Collapse
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


Disabled .. DClock.Bmp


Actual dClock.Bmp


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.


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.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH 1408-9 BrnBmp Disable() adding grey to bitmap
Posted: Fri Oct 10, 2014 12:42 AM

We shall fix this soon and get back to you

Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH 1408-9 BrnBmp Disable() adding grey to bitmap
Posted: Fri Oct 10, 2014 01:07 AM

Please check your email

Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: FWH 1408-9 BrnBmp Disable() adding grey to bitmap
Posted: Fri Oct 10, 2014 01: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 (fw): Select all Collapse
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


New
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH 1408-9 BrnBmp Disable() adding grey to bitmap
Posted: Fri Oct 10, 2014 01: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

Continue the discussion