Creating tooltips

<element id="button">
      <label type="theme_text">Calculate</label>


// ...

<layout id="button_tooltip" type="grid">

<factory id="button_tooltip_row" type="grid">
    <label type="theme_text">Lorem ipsum dolor sit amet</label>

elements and containers can have an optional tooltip_name. A layout with a matching id defines the tooltip's layout manager. The required tooltip_type must match the layout's type.


Use tooltip_config instead of config to specify layout manager-specific configuration settings.

As explained in the section called “Tooltips” the actual tooltip gets created when the tooltip becomes visible. This uses create_custom_tooltip() to install a callback that executes the referenced factory to create the actual tooltip. The factory execution uses an empty x::w::const_uigenerators object (the one that created the original widget, to which the tooltip is attached to, is just a distant memory).


The optional tooltip_appearance sets a custom tooltip appearance object.


Only supported theme widgets have these tooltip attributes. named element widgets are under the callbacks' control and only the callbacks can set their tooltips.

tooltips' contents are the same as label widget's label. This is equivalent to using a widget's create_tooltip() to create a basic, label tooltip.

<container tooltip="container-tooltip">



<tooltip type="label" id="container-tooltip">



container elements also have optional tooltip attributes.