Xbasic

UI_INFO_DLG_DEF_WIDTH Function

Syntax

Width as C = UI_INFO_DLG_DEF_WIDTH(C dialog_format)

Width as C = UI_INFO_DLG_DEF_WIDTH( Title as C )

Width as C = UI_INFO_DLG_DEF_WIDTH( Expression as C )

Arguments

Title

The title of a visible Xdialog.

Expression

Xdialog code that produces a visible control

dialog_format

Character

Description

Get the width of the dialog in inches based on a dialog definition.

Discussion

The UI_INFO_DLG_DEF_WIDTH() function tells you how wide the specified Xdialog control will be.

In this example, lastname prompt and the field are on same line, so the Xdialog will be 2.8125 inches wide.

? ui_info_dlg_def_width("lastname: [.40name]")
= 2.8125

In this example, the lastname prompt and the field are on separate lines (because of the semi-colon after lastname:). The Xdialog will be 2.40625 inches wide.

? ui_info_dlg_def_width("lastname:; [.40name]")
= 2.40625

See Also