IsPoppedUp

Typeexpression
DictionaryLCB
LibraryLiveCode Builder
Syntax
currently popped up
Associationscom.livecode.widget
Summary

Tests if the current widget is in a popup window. Resturns:True if the current widget is in a popup window, False otherwise.

Example
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
RelatedStatement: PopupWidget, ClosePopupWithResult
Description

Use to determine if this widget is being displayed within a popup window.

Tagswidget