Saving position/size of custom dialog boxes

Build 1501 on 14/Nov/2017  This topic last edited on: 6/Sep/2016, at 13:33

The version 1.6 improves saving of the position and the size of entry dialog boxes.

For most of pop-up dialogs, the position and size are saved by clicking the OK button, or when the dialog operation ends successfully (such as in print dialog).

For the info pop-ups, the position is saved before the closing operation.

Note: The position and size of floating panels are saved in workspace, so this type of dialog is not handled.

The positions are saved into EditorialSystemUserOptions configuration in the node DlgPosition.

DlgPosition is a dictionary where the key is the Application name + Dialog name and the value is a string with the position information.

If value is: "0;291;117;400;487" can be parsed as:

0 = windows state (0 normal - 1 minimized 2 Maximized)

291;117 X position and Y position (pixels)

400;487 Width and Height (pixels)

For dialogs that cannot be resized, the Width and Height are ignored.

The default position for most of pop-up dialogs is the center of the main window.

To reset positions by script, use 'UtilsBase.ResetDlgPositions().