A ProgressDialog is a pop-up dialog that indicates the progress of a task, often accompanied by a loading spinner or bar.
prd = ui.showProgressDialog(
text?,
options? )
→
ui object: ProgressDialog
Here are the available methods for the ProgressDialog Component.
Examples
Example - Progress Dialog
class Main extends App
{
onStart()
{
this.main = ui.addLayout("main", "Linear", "VCenter,FillXY")
this.btn = ui.addButton(this.main, "Show Progress Dialog", "Outlined")
this.btn.setOnTouch( this.onTouch )
}
onTouch()
{
ui.showProgressDialog("Loading...", "AutoCancel")
}
}
from hybrid import ui
def OnStart():
main = ui.addLayout("main", "Linear", "VCenter,FillXY")
btn = ui.addButton(main, "Show Progress Dialog", "Outlined")
btn.setOnTouch(onTouch)
def onTouch(event):
ui.showProgressDialog("Loading...", "AutoCancel")
Example - Nocancel progress dialog
class Main extends App
{
onStart()
{
this.main = ui.addLayout("main", "Linear", "VCenter,FillXY")
this.btn = ui.addButton(this.main, "Show Progress Dialog", "Outlined")
this.btn.setOnTouch( this.onTouch )
}
onTouch()
{
this.pdlg = ui.showProgressDialog("Loading...", "NoCancel")
setTimeout( () => {
this.pdlg.hide()
ui.showPopup( "Progress dialog is close!" )
}, 2000)
}
}
from hybrid import ui
def OnStart():
main = ui.addLayout("main", "Linear", "VCenter,FillXY")
btn = ui.addButton(main, "Show Progress Dialog", "Outlined")
btn.setOnTouch(onTouch)
def onTouch(event):
pdlg = ui.showProgressDialog("Loading...", "NoCancel")
def hideProgressDialog():
pdlg.hide()
ui.showPopup("Progress dialog is close!")
app.SetTimeout(hideProgressDialog, 2000)
Properties
The following properties are available on the ProgressDialog object:
Methods
The following methods are available on the ProgressDialog object: