class_="taglist"
Provides an input box for multiple strings which are then parsed into tags. (Available as of version 15.04)
Syntax
<dynamic var=""> <widget class_="taglist" label_="[LABEL TEXT]" value_="@var" inputheight_="[NUMBER]" inputwidth_="[NUMBER]" complete_="0|1" maxcompletions_="[NUMBER]" delimiters_="[TEXT]"/> </dynamic>
Attributes
complete_
- Specifies whether to use autocomplete.
delimiters_
- When text is pasted into the widget, the text is parsed into tags based on this
attribute. You can include more than one delimiter character and the widget will parse
in that order.
The default value is
"\n\r "
. This means that the taglist widget will first attempt to parse on a newline character (\n
). If\n
does not exist, the widget will then attempt to parse the text using the a carriage return character (\r
). Lastly, the widget will parse the text on any whitespace character (newlines, tabs, spaces). dropdownheight_
- Accepts an integer value that specifies the maximum height of the drop-down menu.
If the number of items cannot fit in the specified height, a vertical scroll bar is added to the drop-down menu.
The default value is 200.
(Available as of version 15.26)
dropdownwidth_
- Accepts an integer value that specifies the width of the drop-down menu.
If an item cannot fit in the specified width, the text will wrap over multiple lines.
If
dropdownwidth_
is not specified, the drop-down menu is the same width as the input field (as specified by theinputwidth_
attribute).(Available as of version 15.26)
filter_
filter_
is used in conjunction withserverfilter_="1"
for server-side filtered completion.inputwidth_
- The width of the input area of the taglist widget.
inputheight_
- The height of the input area of the taglist widget. If there is not enough room to display the current tags, this area will scroll.
listvalue_
- Accepts a dynamic variable that stores the selected items as a list-value. This
attribute is interchangeable with
value_
. Eitherlistvalue_
orvalue_
is required. The widget always outputs a list value.(Available after version 15.28)
maxcompletions_
- The maximum number of autocomplete options that can be used if
complete_="1"
. The default value is 1000. rowvalue_
- Accepts a dynamic variable that packs all the values for a given row into a package
using the column names as the package keys. If a user input value is not matched in the
query, that row will be padded with appropriate null values in the table stored in
rowvalue_
, so that the number of rows inrowvalue_
always match the number of values invalue_
.The variable specified to the
rowvalue_
attribute must be declared in the opening<dynamic>
tag as a package.rowvalue_
is optional and is used in conjunction withcomplete_="1"
orserverfilter_="1"
.(Available as of version 15.27)
serverfilter_
- Specifies whether to enable server-side filtered completion in the widget.
value_
- The dynamic variable name upon which the taglist widget will form a 2-way binding. While this widget can read data from a list value or a comma-separated list, it will always write a list value.
Example
The following example shows two taglist widgets. The first, freeform, allows the user to enter any text. The second, completion, is constrained by an autocomplete menu consisting of 2,000 possible values.
<dynamic x="input can,optionally be,a,csl,which is parsed,as a list" y="{lst()}"> <layout arrange_="h"> <layout> <widget class_="taglist" label_="freeform" value_="@x" inputheight_="100" inputwidth_="150"/> <widget class_="value" value_="@x"/> </layout> <layout> <widget class_="taglist" label_="completion" value_="@y" complete_="1" maxcompletions_="2000" delimiters_=","> <table depth="2000"/> <willbe name="x" value="i_"/> </widget> <widget class_="value" value_="@y"/> </layout> </layout> </dynamic>