IsPoppedUp
Type
expression
Summary
Tests if the current widget is in a popup window. Resturns:True if the current widget is in a popup window, False otherwise.
Syntax
currently popped up
Description
Use to determine if this widget is being displayed within a popup window.
Examples
variable mSelected
public handler OnClick()
variable tOption
put getOptionAtPosition(the click position) into tOption
if tOption is not empty then
put tOption into mSelected
// If this widget is being used as a popup then we close the popup and return a value to the caller
if currently popped up then
if mSelected is "Cancel" then
// Dismiss the popup without returning a value - the result will be nothing
close popup
else
// Dismiss the popup - the result will be the value of mSelected
close popup returning mSelected
end if
end if
end if
end handler
private handler getOptionAtPosition(in pPosition as Point) returns String
// Return the name of the option at the given point
...
end handler
Related
statement: PopupWidget, ClosePopupWithResult