Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Getting transparent PNG images to work for welcome screen
Getting transparent PNG images to work for welcome screen [message #444378] Tue, 14 February 2006 13:05 Go to next message
Eclipse UserFriend
I am creating a welcome screen for my application that was a little more
interesting then the one the default wizard creates. I looked at the one
that comes with Eclipse and copied the .css and .xml files to my plug-in.
It worked - don't worry I am not reusing any images, just the .css and
content structure. I have very little experience with .css so a working
set of files was just what I needed.

Then I started creating my own icons. I created a nice .png image
(including alpha transparency) for use on the welcome screen and was
disappointed to see when I tested it that the transparency did not work.
After a little research I found that Microsoft's IE does not fully support
the png format. Nice! I tried to resave my image as a .gif file but the
shadow just does not work as well. After a bit more research and talking
to a friend of mine I found out there is a way to get IE to display .png
files correctly with a bit of code: see this
http://redvip.homelinux.net/varios/explorer-png-en.html web page. So I
tried to add it to my welcome page's .css. I tried to add it several ways
(testing after each):

In shared.css I added
img {
behavior: url("pngbehaviour.htc");
}

In shared.css I added the behaviour line to an exisint img tag
a img {
behavior: url("/pngbehaviour.htc");
border-width : 0;
background-repeat : no-repeat;
}

I have also tried various combinations of no quotes around the url and
with and without the slash at the front. The file pngbehaviour is in the
same folder as shared.css.

My questions are:
Is it possible to get alpha transparency to work with IE in the welcome
page? If so what method worked?

Any help or advice would be appreciated.

Thanks,

Ian
Re: Getting transparent PNG images to work for welcome screen [message #444617 is a reply to message #444378] Fri, 17 February 2006 16:11 Go to previous message
Eclipse UserFriend
No ideas out there? My workaround is to use png icons but have a simple
coloured background so it just looks like transparency is taking place but
really the icon background just matches the page background. This is not
ideal but if there are no other ideas...
Previous Topic:How to properly test a RCP UI?
Next Topic:Editor
Goto Forum:
  


Current Time: Sat Aug 30 23:09:46 EDT 2025

Powered by FUDForum. Page generated in 0.23803 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top