Style for plugins.window.createPopupMenu()

I try to find out on what style sheet the plugins.window.createPopupMenu() text is based? I tried with combobox and the other styles, but couldn’t find which one can be used to style the plugins.window.createPopupMenu()

Regards,

AFAIK for smartclient you can’t style the popupmenu, that’s Java LAF depended.

for webclient you can style and change the default webclient css.

Harjo:
AFAIK for smartclient you can’t style the popupmenu, that’s Java LAF depended

It’s possible for SmartClient as well using it like

var popupMenu = plugins.window.createPopupMenu();

popupMenu.addMenuItem('<html><span style = "font-size: 12; color: #0f0f0f; font-weight: regular">' + i18n.getI18NMessage(menuItems[i].name) + '</span></html>', menuItems[i].method, null, null, itemEnabled, null);

The code is in a for loop with i as index, therefor the menuItems*.x*
There is variation with the font-size: xxx or the font: xxx possible, one can also specify a font or set ‘Default’, but I can’t seem to find on which style tag of the style sheet it’s based (if it is at all). Anyway that would be great.
Regards,

Anyone can help on what style the createPopupMenu() is based, or on what font is the method based on, i. e. which font is used and where is it defined?

Regards,

As I said, that is L&F dependent in Smart client.
of course you can fiddle around yourself with html in it, but that is only for the label’s (strings) inside opupmenu,
You can’t control the main-border, main background etc… with that…

You could try to change the values of the PopupMenu UI Defaults, but as I’m not mistaken this will depend on the LAF you use if these defaults are used:

//on solution open
var uiDefaults = Packages.javax.swing.UIManager.getDefaults();
var font = new Packages.javax.swing.plaf.FontUIResource("Tahoma",0,11);
     uiDefaults.put("PopupMenu.font", font);
//etc, search google for all the java ui defaults PopupMenu.*

Hi Harjo

If you say L&F dependent, can I somewhere (in Servoy) get the information what font the L&F uses? I assume what you say means there is no link to a style in a Servoy Style definition file, and it is not possible to create a link to a Servoy Style, is this assumption correct?

Harjo:
As I said, that is L&F dependent in Smart client.
of course you can fiddle around yourself with html in it, but that is only for the label’s (strings) inside opupmenu,
You can’t control the main-border, main background etc… with that…

Regards,

Has anyone tried the popupmenu with web client?
It changes the current styles when you click on it. For instance, the tabpanel labels font is changed.
Is there a way to force the plugin to use a certain style (not important, it’s ok like it is), but more important would be to prevent it from altering the page current styles? A dedicated style for it would fixe it?

Hi,
I also would like to know if there is a way too keep the style from the page while showing the popup.
Thanks