Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Menu Image
Menu Image [message #254115] Thu, 17 April 2008 11:32 Go to next message
Eclipse UserFriend
Originally posted by: andymorton.btinternet.com

Hi.
I am dynamically creating a context/popup menu whenever I startup.
It creates a menu item, with a dynamic amount of sub menus.

All is well with the menu, but I want to be able to put an image on the
menu, and not the sub menus.

Currently the code is like this:

final MenuManager menuDynamic = new
MenuManage(PrefConstants.TEMPLATE_MENU_NAME,null);

menuDynamic.add(new Action(PrefConstants.TEMPLATE_MENU_FAKE){});
menuDynamic.setRemoveAllWhenShown(true);

<--- I want to set the image on the menuDynamic object around here....

while (items)
{
....//add children
}

Is this possible to do?

Regards,
Andrew
Re: Menu Image [message #254127 is a reply to message #254115] Thu, 17 April 2008 13:05 Go to previous messageGo to next message
Wayne Beaton is currently offline Wayne BeatonFriend
Messages: 554
Registered: December 2017
Senior Member
What are you hoping to see? "image on the menu" doesn't make any sense
to me" You can put an image on a menu item (Action), but not on a menu
itself.

Wayne

On Thu, 2008-04-17 at 11:32 +0000, Andrew Morton wrote:
> Hi.
> I am dynamically creating a context/popup menu whenever I startup.
> It creates a menu item, with a dynamic amount of sub menus.
>
> All is well with the menu, but I want to be able to put an image on the
> menu, and not the sub menus.
>
> Currently the code is like this:
>
> final MenuManager menuDynamic = new
> MenuManage(PrefConstants.TEMPLATE_MENU_NAME,null);
>
> menuDynamic.add(new Action(PrefConstants.TEMPLATE_MENU_FAKE){});
> menuDynamic.setRemoveAllWhenShown(true);
>
> <--- I want to set the image on the menuDynamic object around here....
>
> while (items)
> {
> ...//add children
> }
>
> Is this possible to do?
>
> Regards,
> Andrew
>
Re: Menu Image [message #254131 is a reply to message #254127] Thu, 17 April 2008 13:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andymorton.btinternet.com

Wayne,

Apologies for the confusion.
My context menu contains a parent, for example, 'Mortys Menu'.
I have added several actions to this as children, for example 'Do This'
and 'Do That'.

I want to place an icon beside the text 'Mortys Menu' in the context menu.

Again apologies for the confusion.

Regards,
Andrew
Re: Menu Image [message #254243 is a reply to message #254131] Fri, 18 April 2008 14:53 Go to previous message
Wayne Beaton is currently offline Wayne BeatonFriend
Messages: 554
Registered: December 2017
Senior Member
I poked around a bit and, sadly, my answer at this point is
"dunno" (though, after a quick review of some of the menus in the
Eclipse IDE, it seems possible).

I recommend moving this question to the eclipse.platform newsgroup;
somebody there may have an answer.

HTH,

Wayne

On Thu, 2008-04-17 at 13:27 +0000, Andrew Morton wrote:
> Wayne,
>
> Apologies for the confusion.
> My context menu contains a parent, for example, 'Mortys Menu'.
> I have added several actions to this as children, for example 'Do This'
> and 'Do That'.
>
> I want to place an icon beside the text 'Mortys Menu' in the context menu.
>
> Again apologies for the confusion.
>
> Regards,
> Andrew
>
Previous Topic:.properties file format
Next Topic:TIFF FORMATS
Goto Forum:
  


Current Time: Wed Nov 06 21:59:17 GMT 2024

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

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

Back to the top