Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TK:PixMap and Mask?

Status
Not open for further replies.

xhonzi

Programmer
Joined
Jul 29, 2003
Messages
196
Location
US
I created a pixmap that I thought would have a transparent background. When it's displayed on the Form, it shows the background as a grey colour, not transparent. I'm familiar with using masks with bitmaps, and was wondering if I needed/could do the same with pixmaps. I know you can use .png's with transparencies (and no mask).

Any help?

Xhonzi
 
Tk gives a background color to all widgets. iirc if you have a PNG with transparency and put it in a Label widget, and place the Label on top of something else (so that you should be able to see through the PNG to the widget beneath it)... you won't see through the PNG, because it would have a background color, which would probably be the same color that's behind all other Label widgets (default system window color, unless you specify otherwise).

The only way I've found to make transparent images appear on top of other images and widgets is to put all of them inside of a Canvas object. See Tk::Canvas.

-------------
Cuvou.com | The NEW Kirsle.net
 
Thanks, I'll look into Canvas. I've been meaning to for a while.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top