ListView
Last Updated On 2021-07-16
Version 5MinSDK 7Tutorial Video
This is a visible component that displays a list of text elements.
The list can be set using the ElementsFromString property or using the Elements block in the blocks editor.
Properties
You can set the below properties in the UI part of the builder.
- BackgroundColor - it's a color value which is set to &hff000000 by default.
- ElementsFromString - it's a textArea value which is set to blank by default.
- HeihMargin - it's a four value which is set to 0,0,0,0 by default.
- HeihPadding - it's a four value which is set to 0,0,0,0 by default.
- MarginBottom - it's a non negative float value which is set to 0 by default.
- MarginLeft - it's a non negative float value which is set to 0 by default.
- MarginRight - it's a non negative float value which is set to 0 by default.
- MarginTop - it's a non negative float value which is set to 0 by default.
- PaddingBottom - it's a non negative float value which is set to 0 by default.
- PaddingLeft - it's a non negative float value which is set to 0 by default.
- PaddingRight - it's a non negative float value which is set to 0 by default.
- PaddingTop - it's a non negative float value which is set to 0 by default.
- Selection - it's a string value which is set to blank by default.
- SelectionColor - it's a color value which is set to &hffcccccc by default.
- ShowFilterBar - it's a boolean value which is set to false by default.
- TextColor - it's a color value which is set to &hffffffff by default.
- TextSize - it's a non negative integer value which is set to 22 by default.
- Visible - it's a visibility value which is set to true by default.
Block Properties
You can set the below blocks properties in the blocks section of the builder.
BackgroundColor
The color of the listview background.
Elements
List of text elements to show in the ListView. This will signal an error if the elements are not text strings.
ElementsFromString
The TextView elements specified as a string with the items separated by commas such as: Cheese,Fruit,Bacon,Radish. Each word before the comma will be an element in the list.
Height
Determines the height of the list on the view.
HeightPercent
Specifies the vertical height of the ListView as a percentage of the height of the Screen.
MarginBottom
Property for MarginBottom
MarginLeft
Property for MarginLeft
MarginRight
Property for MarginRight
MarginTop
Property for MarginTop
PaddingBottom
Property for PaddingBottom
PaddingLeft
Property for PaddingLeft
PaddingRight
Property for PaddingRight
PaddingTop
Property for PaddingTop
Selection
Returns the text last selected in the ListView.
SelectionColor
The color of the item when it is selected.
SelectionIndex
The index of the currently selected item, starting at 1. If no item is selected, the value will be 0. If an attempt is made to set this to a number less than 1 or greater than the number of items in the ListView, SelectionIndex will be set to 0, and Selection will be set to the empty text.
ShowFilterBar
Sets visibility of ShowFilterBar. True will show the bar, False will hide it.
TextColor
The text color of the listview items.
TextSize
The text size of the listview items.
Visible
Specifies whether the ListView should be visible on the screen. Value is true if the ListView is showing and false if hidden.
Width
Determines the width of the list on the view.
WidthPercent
Specifies the horizontal width of the ListView as a percentage of the width of the Screen.
Events
You can set the below event blocks in the blocks section of the builder.
AfterPicking
Simple event to be raised after the an element has been chosen in the list. The selected element is available in the Selection property.