NewDialog
dlg = far2_dialog.NewDialog()
Parameters:
none
Returns:
dlg: Dialog object (a table).
It represents the full set of dialog items, and is eventually
passed to function far.Dialog as its 6-th parameter.
Description:
The dialog object has the following features:
1. To add an item, assign it to some string field of the object, e.g.:
dlg.cbxCase = {"DI_CHECKBOX",10,4,0,0, 0, "","",0, "&Case sensitive"}
dlg.cbxWord = {"DI_CHECKBOX",10,5,0,0, 0, "","",0, "&Whole words"}
The added items are now accessible by their names: dlg.cbxCase,
dlg.cbxWord. If there are items that need not to be accessed
after their adding, they can be assigned the same name, e.g.,
dlg.label or dlg._
2. The properties of the added items are accessible in two ways:
either by index, or by name.
print(dlg.cbxCase[3]) --> 4
print(dlg.cbxCase.Y1) --> 4
dlg.cbxCase.Y1 = 6
print(dlg.cbxCase[3]) --> 6
print(dlg.cbxCase.Y1) --> 6
2.1. Here is the correspondence between indexes and names of dialog
item properties (wherever multiple names are listed for an index,
any of them may be used):
1 : Type
2 : X1
3 : Y1
4 : X2
5 : Y2
6 : Selected, ListItems, VBuf
7 : History
8 : Mask
9 : Flags
10 : Data
11 : MaxLength
12 : UserData