Project

General

Profile

$dialog » History » Version 1

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
-----------------------------------------------------------------------------
30
31
*$dialog(name|N)*
32
33
Returns information about a dialog.
34
35
*Parameters*
36
37
name|N - Name of the dialog or if N = 0, number of dialogs, otherwise the Nth dialog.
38
39
*Properties*
40
41
.result - Returns ID of the 'result' button if specified.
42
.x - Returns the X position of the dialog.
43
.y - Returns the Y position of the dialog.
44
.w - Returns the width of the dialog.
45
.h - Returns the height of the dialog.
46
.cw - Returns the width of the dialog client area.
47
.ch - Returns the height of the dialog client area.
48
.title - Returns the dialog title.
49
.modal - Returns [[$true]] if the dialog is modal, otherwise [[$false]].
50
.table - Returns the name of the dialog table.
51
.ok - Returns ID of the 'ok' button if specified.
52
.cancel - Returns ID of the 'cancel' button if specified.
53
.focus - Returns ID of the control that currently has focus.
54
.active - Returns [[$true]] if the dialog is active, otherwise [[$false]].
55
.tab - Returns id of tab that is currently displayed.
56
.hwnd - Returns the window handle.
57
58
*Example*
59
60
<pre>
61
; Print number of dialogs.
62
//echo -ag $dialog(0)
63
64
; Print name of the first dialog.
65
//echo -ag $dialog(1)
66
</pre>