gui_info
Return information about the GUI environment.
Available in:
Apps (win) |
Apps (char) |
Reportwriter |
RPC |
Standalone PL |
X |
|
|
|
|
Syntax
expr gui_info(option[,attr_name])
int option
string attr_name
Description
Returns the GUI information requested based on the option value.
option | specifies the information to be returned
(all sizes are in pixels) and is defined in dv.h:
gui_info_ansi_X | Ansi X size |
gui_info_ansi_Y | Ansi Y size |
gui_info_attr | Attribute value (see below) |
gui_info_button_X | Button X size |
gui_info_button_Y | Button Y size |
gui_info_cell_X | Cell X size |
gui_info_cell_Y | Cell Y size |
gui_info_field_X | Field font char X size |
gui_info_field_Y | Field font char Y size |
gui_info_fixed_X | Fixed X size |
gui_info_fixed_Y | Fixed Y size |
gui_info_garbage | Force garbage collection and return estimated
current memory usage |
gui_info_ipctext | Returns ipc text from client |
gui_info_label_X | Label X size |
gui_info_label_Y | Label Y size |
gui_info_system_X | System font char X size |
gui_info_system_Y | System font char Y size |
gui_info_version | Returns client version as a string |
gui_info_window_X | Screen X size |
gui_info_window_Y | Screen Y size |
|
gui_info_attr
"gui_info_attr" returns the current value of any window attribute. This call requires a second parameter, attr_name, with the name of the desired attribute. All values are returned as a string. If the attribute is not defined, then an empty string is returned.
See System.Windows.Controls Namespace for the available attributes.
Notes
At least one GUI window must have been opened before calling gui_info.
Examples
Return the ansi X size in pixels:
printf(gui_info(gui_info_ansi_X));
Return the DataGrid RowHeight:
printf(gui_info(gui_info_attr,"DataGrid.RowHeight"));