ListPicker
Definition
A button that, when clicked on, displays a list of texts for the user to choose among. The texts can be specified through the Designer or Blocks Editor by setting the ElementsFromString
property to their string-separated concatenation (for example, choice 1, choice 2, choice 3
) or by setting the Elements
property to a List in the Blocks editor.
Setting property ShowFilterBar
to true
, will make the list searchable. Other properties affect the appearance of the button (TextAlignment
, BackgroundColor
, etc.) and whether it can be clicked on (Enabled
).
Properties
- BackgroundColor
- Specifies the
ListPicker
’s background color as an alpha-red-green-blue integer. If anImage
has been set, the color change will not be visible until theImage
is removed. - Elements
- Specifies the list of choices to display.
- ElementsFromString
- Set the list of choices from a string of comma-separated values.
- Enabled
- Specifies whether the
ListPicker
should be active and clickable. - FontBold
- Specifies whether the text of the
ListPicker
should be bold. Some fonts do not support bold. - FontItalic
- Specifies whether the text of the
ListPicker
should be italic. Some fonts do not support italic. - FontSize
- Specifies the text font size of the
ListPicker
, measured in sp(scale-independent pixels). - FontTypeface
- Specifies the text font face of the
ListPicker
as default, serif, sans serif, or monospace. - Height
- Specifies the
ListPicker
’s vertical height, measured in pixels. - HeightPercent
- Specifies the
ListPicker
’s vertical height as a percentage of theScreen
’sHeight
. - Image
- Specifies the path of the
ListPicker
’s image. If there is both anImage
and aBackgroundColor
specified, only theImage
will be visible. - ItemBackgroundColor
- The background color of the
ListPicker
items. - ItemTextColor
- The text color of the ListPicker items.
- Selection
- The selected item. When directly changed by the programmer, the
SelectionIndex
property is also changed to the first item in theListPicker
with the given value. If the value is not inElements
,SelectionIndex
will be set to 0. - SelectionIndex
- Selection index property setter method.
- Shape
- Specifies the shape of the
ListPicker
. The valid values for this property are0
(default),1
(rounded),2
(rectangle), and3
(oval). TheShape
will not be visible if anImage
is used. - ShowFeedback
- Specifies if a visual feedback should be shown when a
ListPicker
with an assignedImage
is pressed. - ShowFilterBar
- If
true
, the ListPicker will show a search filter bar. - Text
- Specifies the text displayed by the
ListPicker
. - TextAlignment
- Specifies the alignment of the
ListPicker
’s text. Valid values are:0
(normal; e.g., left-justified if text is written left to right),1
(center), or2
(opposite; e.g., right-justified if text is written left to right). - TextColor
- Specifies the text color of the
ListPicker
as an alpha-red-green-blue integer. - Title
- Optional title displayed at the top of the list of choices.
- Visible
- Specifies whether the
ListPicker
should be visible on the screen. Value istrue
if theListPicker
is showing andfalse
if hidden. - Width
- Specifies the horizontal width of the
ListPicker
, measured in pixels. - WidthPercent
- Specifies the horizontal width of the
ListPicker
as a percentage of theScreen
’sWidth
.