Component
Component is an abstract superclass for most Thinlet widgets.
All components support the parameters listed below.
Properties
name | string | | Identifies the component. |
enabled | boolean | true | Enables or disables this component. A disabled component is painted gray,
and can't respond to user mouse or keyboard input, gain the keyboard focus,
and generate events. |
visible | boolean | true | An invisible component doesn't take place in parent's layout. |
tooltip | string | | The text pops up when the mouse lingers inside the component. |
font | font | | Custom font for texts. |
foreground | color | | Custom foreground (text) color to use, instead of the default text color. |
background | color | | Custom background color to use, instead of the default background color.
Note: for components with gradients (buttons, menubars, etc...)
this means that the background will be filled with solid color, and not a
custom gradient. |
width | integer | 0 | Fixed preferred width of the component irrespectively of its content.
If it is 0, the component will be asked for the preferred width. |
height | integer | 0 | Preferred height of the component, or 0. |
colspan | integer | 1 | Specifies the number of cells in a column in the component's display area. |
rowspan | integer | 1 | Specifies the number of cells in a row occupied by the component. |
weightx | integer | 0 | Used to determine how to distribute horizontal space among grid cells
when more space is available for its parent component than required. |
weighty | integer | 0 | The extra vertical space is distributed to each cell height in proportion
to its weight. Default value is 0. The row contains 0 weighted components
remains the calculated preferred size. |
halign | choice | fill | Horizontal alignment of the component when more space available
in the cell. Possible values are: fill, center, left, and right. |
valign | choice | fill | Vertical alignment in the cell.
Possible values are: fill, center, top, and bottom. |
property | property | | Binds an arbitrary key/value client property (or properties). |
Listeners
init | A method to invoke only once when the loading of the xml resource
(including this component) is finished. |
focuslost | Invoked when a component loses the keyboard focus,
thus it is no longer the focus owner. |
focusgained | Invoked when a component gains the keyboard focus,
thus it is now the focus owner. |
PopupMenu
Popup menus resemble in functionality normal menus, and can be added
to most components. Popupmenu component can have the same
sub-components as menu. Popup menus are invoked with mouse
right-click.
Properties
name, enabled, visible, tooltip, and property
parameters are similar to
component |
Listeners
menushown | This method is called after the popup menu becomes visible. |
|