PopupMenu.PopupIconMenuItem

PopupMenu.PopupIconMenuItem — A menu item with an icon and a text.

Functions

Object Hierarchy

    Object
    ╰── PopupMenu.PopupIconMenuItem
  

Description

This is a popup menu item displaying an icon and a text. The icon is displayed to the left of the text. PopupImageMenuItem is a similar, deprecated item, that displays the icon to the right of the text, which is ugly in most cases. Do not use it. If you think you need to display the icon on the right, make your own menu item (by copy and pasting the code found below) because PopupImageMenuItem is deprecated and may disappear any time.

Functions

_init ()


_init (string        text,
       string        iconName,
       St.IconType   iconType,
       JSON          params);

Parameters

text

text to display in the label

 

iconName

name of the icon used

 

iconType

the type of icon (usually St.IconType.SYMBOLIC or St.IconType.FULLCOLOR)

 

params

parameters to pass to PopupMenu.PopupBaseMenuItem._init

 

setIconSymbolicName ()


setIconSymbolicName (string   iconName);

Changes the icon to a symbolic icon with name iconName.

Parameters

iconName

name of the icon

 

setIconName ()


setIconName (string   iconName);

Changes the icon to a full color icon with name iconName.

Parameters

iconName

name of the icon