popup

Typecommand
DictionaryLCS
LibraryLiveCode Script
Syntax
popup widget <kind> [at <location>] [with <properties>]
Summary

Opens a widget within a popup window.

Introduced8.0
OSmac, windows, linux
Platformsdesktop
Parameters
NameTypeDescription
kind

The unique identifier of the widget to use for the popup.

location

A point or expression that evaluates to a point. Two integers separated by a comma.

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
popup widget "com.livecode.widget.iconpicker" at the mouseloc
local sColor = "1,1,0.5"
on mouseDown theButton
   -- pop up the colorpicker on right-click or control-click
   if theButton is 3 then
      local tProps
      put "0,0,120,50" into tProps["rect"]
      put sColor into tProps["initialColor"]
      popup widget "com.example.mycolorpicker" with properties tProps
      if the result is not "Cancel" then
         put it into sColor
      end if
   else
      pass mouseDown
   end if
end mouseDown
Values
NameTypeDescription
It

The popup widget command places the widget return value in the it variable.

The result

If the user dismisses the popup, the it variable is set to empty, and the result function returns "Cancel".

RelatedKeyword: popup, it
Message: mouseDown, mouseUp
Function: clickLoc, mouseLoc, result
Description

Use to display a widget within a popup window, for example as a tooltip or picker dialog.

The popup appears with its top left corner at the location. If no location is specified, the popup's top left corner is at the mouse location. While the popup widget is displayed, the handler pauses.

Tagswidget