PopupWidget |
Type | statement |
Dictionary | LCB |
Library | LiveCode Builder |
Syntax | popup widget <Kind> at <Location> [ with properties <Properties> ]
|
Associations | com.livecode.widget |
Summary | Opens a widget within a popup window.
|
Parameters | Name | Type | Description |
---|
Kind | | The unique identifier of the widget to use for the popup.
|
Location | | An expression that evaluates to a Point relative to the current widget. The topleft corner of the popup window will be placed here.
|
Properties | | An expression that evaluates to an array. For each key of the array, the popup widget will be initialized by setting that property to the value for that key.
|
|
Example | private variable mColor as Color
public handler OnClick()
variable tProperties as Array
put the empty array into tProperties
put mColor into tProperties["currentColor"]
popup widget "com.livecode.widget.ColorPicker" at the mouse position with properties tProperties
if the result is not nothing then
put the result into mColor
redraw all
end if
end handler
public handler OnPaint()
...
set the paint of this canvas to solid paint with color mColor
...
end handler
|
Values | Name | Type | Description |
---|
The result | | The result returned by the popup. If the popup is dismissed (by clicking outside the bounds of the popup) this value will be nothing.
|
|
Related | Expression: IsPoppedUp
Statement: ClosePopupWithResult
Operator: IsDefined
|
Description | Use to display a widget within a popup window, for example as a tooltip or picker dialog.
|
Tags | widget |