How to apply styles on Pop up menus

Hi,

I need to apply some styles on Pop up menus (Same as in Top Tab panel. In Top Tab panel, we are using images like ‘media:///popup_menu_style.gif’).
Actually Pop up menu style should be similar to the Top Tab panel style.

I have tried with followings. But output not match with our requirements.

Popup Menu 1.jpg - plugins.popupmenu.createMenuItem(‘’ + label_name + ‘’, method());
Popup Menu 2.jpg - plugins.popupmenu.createMenuItem(‘’ + label_name + ‘’,method(), ‘media:///popup_menu_style.gif’);
Popup Menu 3.jpg - plugins.popupmenu.createMenuItem(‘<body background = 'media:///popup_menu_style.gif'>’ + label_name + ‘’, method());

Anyone can help on this?

Hi Nisala,

Try the following HTML:

'<html><body background = "media:///popup_menu_style.gif"><table width="100%"><tr><td><b>' + label_name + '</b></td></tr></table></body></html>'

Another way would be to use CSS (inside the HTML) and let it repeat the image in the tag.

Hope this helps.

Hi Robert,

Thanks for help.

ROCLASI:
Try the following HTML:

'<html><body background = "media:///popup_menu_style.gif"><table width="100%"><tr><td><b>' + label_name + '</b></td></tr></table></body></html>'

I have tried on this also. But output as follows.

Actually I want to style the whole pop-up menu not a part of it. So is that possible with the pop-up menu plug-in in Servoy?

Please help me.

Hi Nisala,

I don’t think you can change the look by using HTML because the left part of the menu is used for the checkmark (among others) and won’t use the HTML you provide.
As for the he look this is controlled by the LAF. The plugin won’t have control over that.
There might be a way by using application.setUIProperty() to change it but this will be solution-wide.
Perhaps Paul Bakker from Servoy can comment on this.