Previous Icon 3

Next Icon 3

Variable dialogs

In interpreter functions, variable dialogs can be generated for the input of variables. The call is:

res = CADH_VarDialog([“Title“, Width, Height, Pitch], [Dialogelement1], [Dialogelement2], ...);

The title is displayed in the dialog title line, and the width and height values show the dialog's dimensions in pixels. The pitch (between 0 and 1) describes the relationship between the width of the field description and the dialog width (default value 0.4). This definition of the dialog size can be followed by any number of arrays that each define the individual dialog elements.

The return value is an array. Its first value is res[0] =1 if the dialog has been closed by the user clicking OK. Otherwise, it is zero. The other elements of the returned array supply the results of the input fields.

Below, the following convention is used to define the type of a variable: _str=String, _n=Int, _r=Real, _b=Bool. For example, in the case of Caption_str, this means that the Caption variable is of the type String.

Siehe auch

Dialog elements for the variable dialog

Example application of a variable dialog

Interactions with variable dialogs