Alaska Software Inc. - Disable Images
Username: Password:
AuthorTopic: Disable Images
Carlos A Beling Disable Images
on Tue, 15 Sep 2015 10:21:34 -0300
Good morning.
Please can someone show how to show a bitmap, icon, pjg etc in a 
disabled background?

Fraternally
Beling
Peter AlderliestenRe: Disable Images
on Wed, 23 Sep 2015 16:45:31 +0200
Beling,

> Good morning.
> Please can someone show how to show a bitmap, icon, pjg etc in a 
> disabled background?

I don't know if this helps you, but what I do is draw the bitmap with a
transparancy factor:

  nBgColor := XBPSYSCLR_BUTTONMIDDLE
  graSetColor(oPs, nBgColor, nBgColor)
  graBox(oPs, {0,0}, {aBtnSize[1]- 1, aBtnSize[2]- 1}, GRA_FILL)
  oBitmap:transparentClr := oBitmap:getDefaultBGColor()
  oBitmap:transparency   := 200
  oBitmap:draw(oPs, aTarget)                 draw caption

but you could also do something like:

  nBgColor := XBPSYSCLR_BUTTONMIDDLE
  graSetColor(oPs, nBgColor, nBgColor)
  graBox(oPs, {0,0}, {aBtnSize[1]- 1, aBtnSize[2]- 1}, GRA_FILL)
  oBitmap:draw(oPs, aTarget, XBP_STATE_DISABLED)  draw caption

Regards,
Peter
Carlos A Beling Re: Disable Images
on Thu, 24 Sep 2015 13:08:41 -0300
Hello Peter:
Good afternoon.
Many thanks, I'll give it a try.

Fraternally
Beling

On 23/9/2015 11:45, Peter Alderliesten wrote:
> Beling,
>
>> Good morning.
>> Please can someone show how to show a bitmap, icon, pjg etc in a
>> disabled background?
>
> I don't know if this helps you, but what I do is draw the bitmap with a
> transparancy factor:
>
>    nBgColor := XBPSYSCLR_BUTTONMIDDLE
>    graSetColor(oPs, nBgColor, nBgColor)
>    graBox(oPs, {0,0}, {aBtnSize[1]- 1, aBtnSize[2]- 1}, GRA_FILL)
>    oBitmap:transparentClr := oBitmap:getDefaultBGColor()
>    oBitmap:transparency   := 200
>    oBitmap:draw(oPs, aTarget)                 draw caption
>
> but you could also do something like:
>
>    nBgColor := XBPSYSCLR_BUTTONMIDDLE
>    graSetColor(oPs, nBgColor, nBgColor)
>    graBox(oPs, {0,0}, {aBtnSize[1]- 1, aBtnSize[2]- 1}, GRA_FILL)
>    oBitmap:draw(oPs, aTarget, XBP_STATE_DISABLED)  draw caption
>
> Regards,
> Peter
>