Menu Images Problem [message #437199] |
Tue, 01 June 2004 00:34 |
Eclipse User |
|
|
|
Originally posted by: raf_k.sympatico.ca
Menu Images set using the setImage() method aren't rendered correctly with
respect to transparency. I'm using a gif "save_edit.gif" from the icon
directory of the Eclipse release, so it should work.
I'm running Windows XP, and I have tried everything from manually setting
the transparency by defining the transparent pixel's RGB. I've been
pulling my hairs out all day trying to figure it out.
Thank you for any suggestions in advance.
-Raf
|
|
|
|
Re: Menu Images Problem [message #437242 is a reply to message #437236] |
Tue, 01 June 2004 18:12 |
Eclipse User |
|
|
|
Originally posted by: raf_k.sympatico.ca
Hi Steve,
I tried your exact code and still wasn't able to get transparency to work.
Could it be a project setup issue? I'm running windows XP, I have no idea
if that would be a factor either.
Steve Northover wrote:
> WORKSFORME.
> public static void main (String [] args) {
> Display display = new Display ();
> Image image = new Image (display, _Scrapbook.class.getResourceAsStream
> ("save_edit.gif"));
> Shell shell = new Shell (display);
> Menu menuBar = new Menu (shell, SWT.BAR);
> shell.setMenuBar (menuBar);
> MenuItem fileItem = new MenuItem (menuBar, SWT.CASCADE);
> fileItem.setText ("File");
> Menu fileMenu = new Menu (shell, SWT.DROP_DOWN);
> fileItem.setMenu (fileMenu);
> MenuItem saveItem = new MenuItem (fileMenu, SWT.PUSH);
> saveItem.setText ("Save");
> saveItem.setImage (image);
> shell.open ();
> while (!shell.isDisposed ()) {
> if (!display.readAndDispatch ()) display.sleep ();
> }
> image.dispose ();
> display.dispose ();
> }
> "Raf Kaplon" <raf_k@sympatico.ca> wrote in message
> news:c9giuh$71v$1@eclipse.org...
> >
> > Menu Images set using the setImage() method aren't rendered correctly with
> > respect to transparency. I'm using a gif "save_edit.gif" from the icon
> > directory of the Eclipse release, so it should work.
> >
> > I'm running Windows XP, and I have tried everything from manually setting
> > the transparency by defining the transparent pixel's RGB. I've been
> > pulling my hairs out all day trying to figure it out.
> >
> > Thank you for any suggestions in advance.
> >
> > -Raf
> >
|
|
|
Re: Menu Images Problem [message #437365 is a reply to message #437242] |
Thu, 03 June 2004 12:45 |
Steve Northover Messages: 1636 Registered: July 2009 |
Senior Member |
|
|
Can you post a screen shot of what you are seeing?
"Raf Kaplon" <raf_k@sympatico.ca> wrote in message
news:c9igus$dvo$1@eclipse.org...
> Hi Steve,
>
> I tried your exact code and still wasn't able to get transparency to work.
> Could it be a project setup issue? I'm running windows XP, I have no idea
> if that would be a factor either.
>
>
>
> Steve Northover wrote:
>
> > WORKSFORME.
>
> > public static void main (String [] args) {
> > Display display = new Display ();
> > Image image = new Image (display, _Scrapbook.class.getResourceAsStream
> > ("save_edit.gif"));
> > Shell shell = new Shell (display);
> > Menu menuBar = new Menu (shell, SWT.BAR);
> > shell.setMenuBar (menuBar);
> > MenuItem fileItem = new MenuItem (menuBar, SWT.CASCADE);
> > fileItem.setText ("File");
> > Menu fileMenu = new Menu (shell, SWT.DROP_DOWN);
> > fileItem.setMenu (fileMenu);
> > MenuItem saveItem = new MenuItem (fileMenu, SWT.PUSH);
> > saveItem.setText ("Save");
> > saveItem.setImage (image);
> > shell.open ();
> > while (!shell.isDisposed ()) {
> > if (!display.readAndDispatch ()) display.sleep ();
> > }
> > image.dispose ();
> > display.dispose ();
> > }
>
> > "Raf Kaplon" <raf_k@sympatico.ca> wrote in message
> > news:c9giuh$71v$1@eclipse.org...
> > >
> > > Menu Images set using the setImage() method aren't rendered correctly
with
> > > respect to transparency. I'm using a gif "save_edit.gif" from the icon
> > > directory of the Eclipse release, so it should work.
> > >
> > > I'm running Windows XP, and I have tried everything from manually
setting
> > > the transparency by defining the transparent pixel's RGB. I've been
> > > pulling my hairs out all day trying to figure it out.
> > >
> > > Thank you for any suggestions in advance.
> > >
> > > -Raf
> > >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02959 seconds