Adds a time picker component to the app.
These are the setter and getter properties for the addTimePicker Component.
Example - Basic
class Main extends App
{
onStart()
{
this.main = ui.addLayout( "main", "Linear", "VCenter,ScrollY", 1, 1 )
this.btn = ui.addButton( this.main, "Show Time Picker", "Outlined,Secondary", 0.2 )
this.btn.setOnTouch( this.showTimePicker )
this.tpk = ui.addTimePicker()
this.tpk.setOnSelect( this.onSelect )
}
showTimePicker()
{
this.tpk.show()
}
onSelect( value )
{
console.log( value )
}
}
from hybrid import ui
def OnStart():
global tpk
main = ui.addLayout("main", "Linear", "VCenter,ScrollY", 1, 1)
btn = ui.addButton(main, "Show Time Picker", "Outlined,Secondary", 0.2)
btn.setOnTouch(showTimePicker)
tpk = ui.addTimePicker()
tpk.setOnSelect(onSelect)
def showTimePicker(event):
tpk.show()
def onSelect(value):
print(value)