$dialog » History » Version 2
Per Amundsen, 08/14/2015 01:54 PM
| 1 | 1 | Per Amundsen | _Added in 1.9.0_ |
|---|---|---|---|
| 2 | |||
| 3 | *$dialog(name,table,[parent])* |
||
| 4 | |||
| 5 | Creates a modal dialog. |
||
| 6 | |||
| 7 | *Parameters* |
||
| 8 | |||
| 9 | name - Name of the dialog to create. |
||
| 10 | table - Name of the dialog table to use. |
||
| 11 | [parent] - Name of the parent window to associate the dialog with. (optional) |
||
| 12 | |||
| 13 | *Example* |
||
| 14 | |||
| 15 | <pre> |
||
| 16 | ; Create a dialog table. |
||
| 17 | dialog Example { |
||
| 18 | title "Example" |
||
| 19 | size -1 -1 100 50 |
||
| 20 | option dbu |
||
| 21 | button "Example 1", 1, 4 10 40 12 |
||
| 22 | } |
||
| 23 | |||
| 24 | ; Create and open the dialog using 'Example' table. |
||
| 25 | //noop $dialog(Example, Example) |
||
| 26 | </pre> |
||
| 27 | |||
| 28 | _See also [[/dialog]]._ |
||
| 29 | 2 | Per Amundsen | |
| 30 | 1 | Per Amundsen | ----------------------------------------------------------------------------- |
| 31 | |||
| 32 | *$dialog(name|N)* |
||
| 33 | |||
| 34 | Returns information about a dialog. |
||
| 35 | |||
| 36 | *Parameters* |
||
| 37 | |||
| 38 | name|N - Name of the dialog or if N = 0, number of dialogs, otherwise the Nth dialog. |
||
| 39 | |||
| 40 | *Properties* |
||
| 41 | |||
| 42 | .result - Returns ID of the 'result' button if specified. |
||
| 43 | .x - Returns the X position of the dialog. |
||
| 44 | .y - Returns the Y position of the dialog. |
||
| 45 | .w - Returns the width of the dialog. |
||
| 46 | .h - Returns the height of the dialog. |
||
| 47 | .cw - Returns the width of the dialog client area. |
||
| 48 | .ch - Returns the height of the dialog client area. |
||
| 49 | .title - Returns the dialog title. |
||
| 50 | .modal - Returns [[$true]] if the dialog is modal, otherwise [[$false]]. |
||
| 51 | .table - Returns the name of the dialog table. |
||
| 52 | .ok - Returns ID of the 'ok' button if specified. |
||
| 53 | .cancel - Returns ID of the 'cancel' button if specified. |
||
| 54 | .focus - Returns ID of the control that currently has focus. |
||
| 55 | .active - Returns [[$true]] if the dialog is active, otherwise [[$false]]. |
||
| 56 | .tab - Returns id of tab that is currently displayed. |
||
| 57 | .hwnd - Returns the window handle. |
||
| 58 | |||
| 59 | *Example* |
||
| 60 | |||
| 61 | <pre> |
||
| 62 | ; Print number of dialogs. |
||
| 63 | //echo -ag $dialog(0) |
||
| 64 | |||
| 65 | ; Print name of the first dialog. |
||
| 66 | //echo -ag $dialog(1) |
||
| 67 | </pre> |