All vizinput dialog objects accept the same optional keyword arguments for changing their title, parent object, and position. The following table lists these arguments and their default values:
Argument |
Description |
title = 'Vizard' |
A string value that is displayed in the upper left corner of the dialog. |
parent = viz.window.getHandle() |
This can either be the Vizard graphics window or the desktop. By default it is set to the Vizard graphics window. When parenting to the desktop set this argument to 0 |
center = vizinput.CENTER |
Sets the dialog's position in relation to the parent object. See the table below for a list of available flags. |
pos = None |
This will set the x and y position of the dialog in pixel coordinates, where (0,0) is the upper left corner of the monitor. If a value is given here, the center argument will be ignored. |
The following flags and combinations of flags can be used with the center argument:
Flag |
vizinput.CENTER |
vizinput.CENTER_LEFT |
vizinput.CENTER_RIGHT |
vizinput.CENTER_TOP |
vizinput.CENTER_BOTTOM |
vizinput.CENTER_LEFT|vizinput.CENTER_TOP |
vizinput.CENTER_RIGHT|vizinput.CENTER_TOP |
vizinput.CENTER_LEFT|vizinput.CENTER_BOTTOM |
vizinput.CENTER_RIGHT|vizinput.CENTER_BOTTOM |
The vizinput module provides commands to change the title, parent, and center defaults. This is useful when you need to make a change to multiple dialogs. Instead of using a keyword argument each time one is created, the default command is called once and is applied to all dialogs that follow:
Command |
Description |
vizinput.setDefaultTitle(title) |
title: A string that sets the default title. |
vizinput.setDefaultParent(parent) |
parent: Sets the default parent object. Use 0 to parent to the desktop and viz.window.getHandle() to parent to the Vizard graphics window |
vizinput.setDefaultCenter(center) |
center: Sets the default center. |
The following example sets new center and title defaults: