Edit Control: Difference between revisions
>Ronie (Created page with 'The edit control allows a user to input text in XBMC. You can choose the font, size, colour, location and header of the text to be displayed. ===Example=== <source lang="xml"> …') |
|||
(19 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
The edit control allows a user to input text in | <section begin="main content" /> | ||
===Example=== | The edit control allows a user to input text in Kodi. You can choose the font, size, colour, location and header of the text to be displayed. | ||
< | === Example === | ||
<control type=" | <syntaxhighlight lang="xml"> | ||
<control type="edit" id="1"> | |||
<description>My First edit control</description> | <description>My First edit control</description> | ||
< | <left>80</left> | ||
< | <top>60</top> | ||
<width>250</width> | <width>250</width> | ||
<visible>true</visible> | <visible>true</visible> | ||
Line 12: | Line 13: | ||
<hinttext>Enter search string</hinttext> | <hinttext>Enter search string</hinttext> | ||
<font>font14</font> | <font>font14</font> | ||
<textoffsetx>10</textoffsetx> | |||
<textcolor>FFB2D4F5</textcolor> | <textcolor>FFB2D4F5</textcolor> | ||
<disabledcolor>FF000000</disabledcolor> | |||
<invalidcolor>FFFFFFFF</invalidcolor> | |||
<texturefocus>button-focus.png</texturefocus> | |||
<texturenofocus>button-nofocus.png</texturenofocus> | |||
<pulseonselect>no</pulseonselect> | |||
</control> | </control> | ||
</ | </syntaxhighlight> | ||
===Available | === Available tags === | ||
In addition to the [[Default Control Tags]] the following tags are available. | In addition to the [[Default Control Tags]] the following tags are available. Note that each tag is '''lower case''' only. This is important, as xml tags are case-sensitive. | ||
{| class=" | {| class="prettytable" | ||
|- | ! Tag !! Description | ||
| | |- | ||
| | | '''aligny''' | ||
|- | | Can be top or center. Aligns the text within its given control <height>. Defaults to top | ||
| | |- | ||
| '''label''' | |||
Specifies the header text which should be shown. You should specify an entry from the strings. | | | ||
|- | Specifies the header text which should be shown. You should specify an entry from the strings.po here (either the Kodi strings.po or your skin's strings.po file), however you may also hardcode a piece of text also if you wish, though of course it will not be localized. You can use the full [[Label Formatting|label formatting syntax]] and [[Label Parsing|you may also specify more than one piece of information here by using the $INFO and $LOCALIZE formats.strings]].xml) | ||
| | |- | ||
| | | '''hinttext''' | ||
|- | | Specifies the text which should be displayed in the edit label control, until the user enters some text. It can be used to provide a clue as to what a user should enter in this control. | ||
| | |- | ||
| | | '''font''' | ||
|- | | Specifies the font to use from the font.xml file. | ||
| | |- | ||
| | | '''textcolor''' | ||
| Specifies the color the text should be, in hex AARRGGBB format, or a name from the [[Colour themes|colour theme.]] | |||
|- | |||
| '''textwidth''' | |||
| Will truncate any text that's too long. | |||
|} | |} | ||
[[ | |||
<section end="main content" /> | |||
== See also == | |||
'''Development:''' | |||
* [[Add-on development]] | |||
* [[Skinning]] | |||
[[Category:Skin development]] |
Latest revision as of 00:42, 14 April 2022
The edit control allows a user to input text in Kodi. You can choose the font, size, colour, location and header of the text to be displayed.
Example
<control type="edit" id="1"> <description>My First edit control</description> <left>80</left> <top>60</top> <width>250</width> <visible>true</visible> <aligny>center</aligny> <label>Search</label> <hinttext>Enter search string</hinttext> <font>font14</font> <textoffsetx>10</textoffsetx> <textcolor>FFB2D4F5</textcolor> <disabledcolor>FF000000</disabledcolor> <invalidcolor>FFFFFFFF</invalidcolor> <texturefocus>button-focus.png</texturefocus> <texturenofocus>button-nofocus.png</texturenofocus> <pulseonselect>no</pulseonselect> </control>
Available tags
In addition to the Default Control Tags the following tags are available. Note that each tag is lower case only. This is important, as xml tags are case-sensitive.
Tag | Description |
---|---|
aligny | Can be top or center. Aligns the text within its given control <height>. Defaults to top |
label |
Specifies the header text which should be shown. You should specify an entry from the strings.po here (either the Kodi strings.po or your skin's strings.po file), however you may also hardcode a piece of text also if you wish, though of course it will not be localized. You can use the full label formatting syntax and you may also specify more than one piece of information here by using the $INFO and $LOCALIZE formats.strings.xml) |
hinttext | Specifies the text which should be displayed in the edit label control, until the user enters some text. It can be used to provide a clue as to what a user should enter in this control. |
font | Specifies the font to use from the font.xml file. |
textcolor | Specifies the color the text should be, in hex AARRGGBB format, or a name from the colour theme. |
textwidth | Will truncate any text that's too long. |
See also
Development: