Widgets TEXTFIELD - thica/ORCA-Remote GitHub Wiki
The textfield widget enable you to place a text on a page There are different attributes to control text rendering. Please note: Text attributes are shared with other widgets like buttons as well. The following attributes are additional attributes to common widget attributs
Attribute | Description |
---|---|
type | fixed: needs to be "TEXTFIELD". Capital letters! |
htextalign | Horizontal text alignment of the text within the widgets rectangle. Could be "left", "center" or "right". Default is "center" |
vtextalign | Vertical text alignment of the text within the widgets rectangle. Could be "top", "middle" or "bottom". Default is "middle" |
bold | If set to "1", the font will be displayed as bold font. (If supported by the font) |
italic | If set to "1", the font will be displayed as italic font. (If supported by the font) |
fontid | The fontid to use for the font. Please read the fonts section for loading and using fonts. If no fontid is given, the default font from the skin or definiton parameters is used. |
fontsize | The size for the font. This is a virtual font size, which is scaled to fit to the physical screen. If not fontsize if given, the default skin fontsize is used. |
iconfontsize | The size for the font if an icon is shown. This is a virtual font size, which is scaled to fit to the physical screen. |
textcolor | The color of the text in hexedecimal RGBA format. It has to start with a pound sign (eg: #ff00ffff). Please use only low capital chars. If not textcolor if given, the default skin textcolor is used. |
caption | This defines the text to show. You can use fixed strings, but it is recommended to use a variable , which will be replaced at runtime. If the caption starts with icon: then the icon name follwed the colon is used (eg. icon:help). For icons you can also add a color as well (eg. icon:info color:$var(red) ) |
clock | If you set this attribute to "1", the widget will show the current time. Time format will come from the language settings (in future versions) |
date | If you set this attribute to "1", the widget will show the current date. Date format wiill come from the language settings (in future versions) |
Below you see an example for a textfield definition
<element name='Text Volume' type='TEXTFIELD' posx='left' posy='middle' width='%30' height='of:width:self' fontsize='%h20' caption='Volume' />