2019-05-03 12:48:59 +00:00
|
|
|
sub init()
|
|
|
|
m.top.layoutDirection = "vert"
|
|
|
|
m.top.horizAlignment = "center"
|
|
|
|
m.top.vertAlignment = "top"
|
2019-10-13 20:52:34 +00:00
|
|
|
m.top.visible = false
|
2022-09-05 06:50:13 +00:00
|
|
|
m.searchText = m.top.findNode("search_Key")
|
|
|
|
m.searchText.textEditBox.hintText = tr("Search")
|
|
|
|
m.searchText.keyGrid.keyDefinitionUri = "pkg:/components/data/CustomAddressKDF.json"
|
|
|
|
m.searchText.textEditBox.voiceEnabled = true
|
|
|
|
m.searchText.textEditBox.active = true
|
|
|
|
m.searchText.ObserveField("text", "searchMedias")
|
|
|
|
m.searchSelect = m.top.findNode("searchSelect")
|
|
|
|
|
|
|
|
'set lable text
|
|
|
|
m.label = m.top.findNode("text")
|
|
|
|
m.label.text = tr("Search now")
|
2019-10-13 20:52:34 +00:00
|
|
|
|
2019-05-03 12:48:59 +00:00
|
|
|
end sub
|
|
|
|
|
2022-09-05 06:50:13 +00:00
|
|
|
sub searchMedias()
|
|
|
|
m.top.search_values = m.searchText.text
|
|
|
|
if m.top.search_values.len() > 1
|
|
|
|
m.searchText.textEditBox.leadingEllipsis = true
|
|
|
|
else
|
|
|
|
m.searchText.textEditBox.leadingEllipsis = false
|
2019-05-03 12:48:59 +00:00
|
|
|
end if
|
2020-05-05 21:09:18 +00:00
|
|
|
end sub
|