If you look at ImagePanel.cpp you will see that any images it contains are painted in ::PaintBackground() and not ::Paint(). So, to draw an image panel with no background you should actually do a SetFillColor( Color( 0,0,0,0 ) ) rather than SetPaintBackground( false ). This is because the ImagePanel::PaintBackground() does NOT chain the PaintBackground() call back to the parent (so the underlying panel won't draw a background), and it checks the m_FillColor parameter to see if it should render a background color (rather than BgColor()).
Note that this means my previous email was incorrect, you need to not set SetPaintBackground( false ) for image panels if you want them to draw at all. If you want to experiment you could derive a panel from ImagePanel and have it render the Image it contains in ::Paint() and then SetPaintBackground( false ) on that new type. - Alfred ----Original Message---- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew (British_Bomber) Sent: Wednesday, June 29, 2005 12:13 PM To: [email protected] Subject: Re: [hlcoders] Making "EditablePanel" bg transparent > I have replaced the Health panel with an image rather than the > numbers, and when ever I set the background paint to false the image > dissapears. The title remains but both the background and image > dissapear even though the image is being drawn in the Paint() > function. I have other panels that display like that no bother but > for some reason the Health, whether it be the modified standard > element or an element I wrote from scratch never wants to show the > image when the background is hidden. > > 1) Is that the same kind of issue you have? > > 2) Has anyone had this issue and fixed it or should I just reread the > VGUI documentation? > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list > archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

