Applet.TextIconApplet: Cinnamon Javascript Reference Manual

## Applet.TextIconApplet Applet.TextIconApplet — Applet with icon and label |

## Functions

| _init ()
| update_label_margin ()
| set_applet_label ()
| set_applet_enabled ()
| hide_applet_label ()
| hide_applet_icon ()

## Properties

St.Label | _applet_label |

## Object Hierarchy

        Object
        ╰── Applet.Applet
            ╰── Applet.IconApplet
                ╰── Applet.TextIconApplet

## Description

Applet that displays an icon and a text. The icon is on the left of the text

## Functions

### _init ()

    _init (St.Side   orientation,
           int       panelHeight,
           int       instance_id);

#### Parameters

orientation | orientation of the applet; Orientation of panel containing the actor |
panelHeight | height of the panel containing the applet |
instance_id | instance id of the applet |

### update_label_margin ()

    update_label_margin ();

Sets a margin between the icon and the label when it contains a non empty string. The margin is always set to zero in a vertical panel

### set_applet_label ()

    set_applet_label (string   text);

Sets the text of the actor to `text`

#### Parameters

text | text to be displayed at the label |

### set_applet_enabled ()

    set_applet_enabled (boolean   enabled);

Sets whether the applet is enabled or not. A disabled applet sets its padding to 0px and doesn't react to clicks

#### Parameters

enabled | whether this applet is enabled or not |

### hide_applet_label ()

    hide_applet_label (boolean   hide);

Sets whether the applets label is hidden or not. A convenience function to hide applet labels when an applet is placed in a vertical panel

#### Parameters

hide | whether the applet label is hidden or not |

### hide_applet_icon ()

    hide_applet_icon ();

Hides the icon of the applet

## Property Details

### The `“_applet_label”` property

      “_applet_label”        St.Label

Label of the applet