Project

General

Profile

Actions

Added in 1.9.0

$dialog(name,table,[parent])

Creates a modal dialog.

See also /dialog, on DIALOG, Dialog Items.

Parameters

Parameter Description
name Name of the dialog to create.
table Name of the dialog table to use.
[parent] Name of the parent window to associate the dialog with or -1 = Desktop window, -2 = Main AdiIRC window, -3 = Currently active window, -4 = Currently active dialog. (optional)

Example

: Create a dialog table.
Dialog Example1 {
  title "This is Example 1" 
  size -1 -1 172 129
  option dbu
  tab "Tab A", 14, 2 0 165 123
  tab "Tab B", 15
  tab "Tab C", 16
  edit "", 17, 8 16 154 104, tab 16 multi return autohs vsbar
  menu "&File", 1
  item "&New", 6, 1
  item "&Open", 7, 1
  item break, 8, 1
  item "&Save", 9, 1
  item "Save &as", 10, 1
  menu "&Edit", 2
  item "&Copy", 11, 2
  item "P&aste", 12, 2
  menu "&view", 3
  item "&All", 13, 3
  menu "&Help", 4
  item "&About", 5, 4
}

; Create and open the dialog using the 'Example' table.
//noop $dialog(Example, Example)

$dialog(name|N)

Returns information about a dialog.

Parameters

Parameter Description
name|N Name of the dialog or if N = 0, number of dialogs, otherwise the Nth dialog.

Properties

Property Description
.result Returns ID of the 'result' button if specified.
.x Returns the X position of the dialog.
.y Returns the Y position of the dialog.
.w Returns the width of the dialog.
.h Returns the height of the dialog.
.cw Returns the width of the dialog client area.
.ch Returns the height of the dialog client area.
.title Returns the dialog title.
.modal Returns $true if the dialog is modal, otherwise $false.
.state Returns minimized/maximized/hidden/normal. (AdiIRC only)
.table Returns the name of the dialog table.
.ok Returns ID of the 'ok' button if specified.
.cancel Returns ID of the 'cancel' button if specified.
.focus Returns ID of the control that currently has focus.
.active Returns $true if the dialog is active, otherwise $false.
.tab Returns id of tab that is currently displayed.
.hwnd Returns the window handle.
.icon Returns the filename of the icon file. (AdiIRC only)
.local Returns $true if the dialog is a local dialog, otherwise $false. (AdiIRC only)
.dbu Returns $true if the dialog was created with the dbu option, otherwise $false. (AdiIRC only)
.default Returns the id of the "default" button, if defined. (AdiIRC only)

Example

; Print number of dialogs.
//echo -ag $dialog(0)

; Print name of the first dialog.
//echo -ag $dialog(1)

Updated by Per Amundsen over 1 year ago · 12 revisions

Also available in: PDF HTML TXT