Project

General

Profile

$dialog » History » Version 5

Per Amundsen, 06/25/2016 02:34 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 3 Per Amundsen
: Create a dialog table.
17
Dialog Example1 {
18
  title "This is Example 1"
19
  size -1 -1 172 129
20
  option dbu
21
  tab "Tab A", 14, 2 0 165 123
22
  tab "Tab B", 15
23
  tab "Tab C", 16
24
  edit "", 17, 8 16 154 104, tab 16 multi return autohs vsbar
25
  menu "&File", 1
26
  item "&New", 6, 1
27
  item "&Open", 7, 1
28
  item break, 8, 1
29
  item "&Save", 9, 1
30
  item "Save &as", 10, 1
31
  menu "&Edit", 2
32
  item "&Copy", 11, 2
33
  item "P&aste", 12, 2
34
  menu "&view", 3
35
  item "&All", 13, 3
36
  menu "&Help", 4
37
  item "&About", 5, 4
38 1 Per Amundsen
}
39
40 4 Per Amundsen
; Create and open the dialog using the 'Example' table.
41 1 Per Amundsen
//noop $dialog(Example, Example)
42
</pre>
43
44
_See also [[/dialog]]._
45 2 Per Amundsen
46 1 Per Amundsen
-----------------------------------------------------------------------------
47
48
*$dialog(name|N)*
49
50
Returns information about a dialog.
51
52
*Parameters*
53
54
name|N - Name of the dialog or if N = 0, number of dialogs, otherwise the Nth dialog.
55
56
*Properties*
57
58
.result - Returns ID of the 'result' button if specified.
59
.x - Returns the X position of the dialog.
60
.y - Returns the Y position of the dialog.
61
.w - Returns the width of the dialog.
62
.h - Returns the height of the dialog.
63
.cw - Returns the width of the dialog client area.
64
.ch - Returns the height of the dialog client area.
65
.title - Returns the dialog title.
66
.modal - Returns [[$true]] if the dialog is modal, otherwise [[$false]].
67
.table - Returns the name of the dialog table.
68
.ok - Returns ID of the 'ok' button if specified.
69
.cancel - Returns ID of the 'cancel' button if specified.
70
.focus - Returns ID of the control that currently has focus.
71
.active - Returns [[$true]] if the dialog is active, otherwise [[$false]].
72
.tab - Returns id of tab that is currently displayed.
73
.hwnd - Returns the window handle.
74 5 Per Amundsen
.icon - Returns the filename of the icon file. (AdiIRC only)
75 1 Per Amundsen
76
*Example*
77
78
<pre>
79
; Print number of dialogs.
80
//echo -ag $dialog(0)
81
82
; Print name of the first dialog.
83
//echo -ag $dialog(1)
84
</pre>