Project

General

Profile

$dialog » History » Version 7

Per Amundsen, 02/18/2017 08:49 AM

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