How can i listview in filterbar hint text change

27 views
Skip to first unread message

Aydin Ersoz

unread,
Apr 21, 2019, 4:45:47 PM4/21/19
to MIT App Inventor Forum
I didn't change filterbar hint text in  Listview interfcae object .Please help me
Ekran Alıntısı.PNG

TimAI2

unread,
Apr 21, 2019, 5:13:21 PM4/21/19
to MIT App Inventor Forum

ABG

unread,
Apr 22, 2019, 9:22:06 AM4/22/19
to MIT App Inventor Forum
Here's the AI2 Help on the ListView ...

ListView

This is a visible component that allows to place a list of text elements in your Screen to display. 
The list can be set using the ElementsFromString property or using the Elements block in the blocks editor. 
Warning: This component will not work correctly on Screens that are scrollable.

Properties

BackgroundColor
The color of the listview background.
Elements
List of text elements to build your list.
ElementsFromString
Build a list with a series of text elements 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.
Selection
Returns the text last selected in the ListView.
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.
Visible
Specifies whether the component should be visible on the screen. Value is true if the component is showing and false if hidden.
Width
Determines the width of the list on the view.

Events

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.

Methods

none



 Unfortunately, it has no method to change the search box hint.

However, you can make your own fake  search text box using a Text Box, 
a Clock Timer, and a global variable with your initial MyElements list ...

set textbox.Hint to whatever you like whenever you want to

Clock1.Timer:
   set local variable elements to create empty list
   for each item in list MyElements
     if item contains textbox.Text then
        add item to elements
   end for each
   set ListView.Elements to elements

ABG

Reply all
Reply to author
Forward
0 new messages