comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Transparency in Bitmap buttons
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Transparency in Bitmap buttons [message #26323] Wed, 15 August 2001 08:55
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
Senior Member
Has anyone had luck using the transparency feature of color-bitmap
buttons?

The manual quotes:

>>>> >>>>>>>>>>>>
Transparent Bitmaps

For 16- and 256-color bitmaps, IDL uses the color of the pixel in the
lower left corner as the transparent color. All pixels of this color
become transparent, allowing the button color to show through. This
allows you to use bitmaps that are not rectangular. If you have a
rectangular bitmap that you want to use as a button label, you must
either draw a border of a different color around the bitmap or save the
bitmap as 24-bit (TrueColor). If your bitmap also contains text, make
sure the border you draw is a different color than the text, otherwise
the text color will become transparent.
<<<<<<<<<<<<<<<<<


But I'm unable to see this behavior.

Try:

IDL> base=widget_base(/COLUMN)
IDL> but=widget_button(base,VALUE=filepath('zoom.bmp',$
SUBDIR=['resource','bitmaps']),/BITMAP)
IDL> widget_control, base, /realize

Does the button blend into the background tranparently? On my system
(x86 linux unix 5.4), it does not, despite this claim. Note that if you
have a matching gray background it may appear to blend in (though
without real transparency). Please note your system and version if
responding.

Thanks,

JD
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: GET_SCREEN_SIZE in Windows
Next Topic: Re: Transparency in Bitmap buttons

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:52:40 PDT 2025

Total time taken to generate the page: 0.00425 seconds