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_XAnsi X size
gui_info_ansi_YAnsi Y size
gui_info_attrAttribute value (see below)
gui_info_button_XButton X size
gui_info_button_YButton Y size
gui_info_cell_XCell X size
gui_info_cell_YCell Y size
gui_info_field_XField font char X size
gui_info_field_YField font char Y size
gui_info_fixed_XFixed X size
gui_info_fixed_YFixed Y size
gui_info_garbageForce garbage collection and return estimated current memory usage
gui_info_ipctextReturns ipc text from client
gui_info_label_XLabel X size
gui_info_label_YLabel Y size
gui_info_system_XSystem font char X size
gui_info_system_YSystem font char Y size
gui_info_versionReturns client version as a string
gui_info_window_XScreen X size
gui_info_window_YScreen 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"));