Shows a color picker.
Here are the available methods of the ColorPicker Component.
Example - Basic
class Main extends App
{
onStart()
{
this.main = ui.addLayout("main", "Linear", "VCenter,FillXY")
this.btn = ui.addButton(this.main, "Show Popup", "Primary")
this.btn.setOnTouch( this.showColorPicker )
}
showColorPicker()
{
ui.showColorPicker(null, "Alpha", this.onSelect)
}
onSelect( clr )
{
ui.showPopup( clr )
}
}
from hybrid import ui
def OnStart():
main = ui.addLayout("main", "Linear", "VCenter,FillXY")
btn = ui.addButton(main, "Show Popup", "Primary")
btn.setOnTouch(showColorPicker)
def showColorPicker(event):
ui.showColorPicker(None, "Alpha", onSelect)
def onSelect(clr):
ui.showPopup(clr)