CHECK

From Macros Wiki
Revision as of 11:21, 26 February 2025 by CatoH (talk | contribs) (added example with if statements)
Jump to navigationJump to search

Up

Command

CHECK
CHECK
CHECK <left>, <top>, <width>, <height>, <text>, <variable>, [<default>]


Define the size and the position of a check box and the text to be displayed next to it.

Parameters

<left>
Start position measured from the left edge of the dialog.
<top>
Start position of measured from the top edge of the dialog.
<width>
Width of the control.
<text>
Text to be displayed next to the check box, must be in double quotes.
<variable>
Variable to be set to the state of the check box. 0 for unchecked, 1 for checked.
[<default>]
Optional default value.

Example

CHECK 070, 044, 070, 24, "Cross", dir1, 0
For an example macro see GetCommands.dlg GeoSavedProcess.dlg

Example with IF statement

first_var=1
if first_var=1 then CHECK 070, 044, 070, 24, "Cross", dir1, 0

will only show the check box when first_var = 1

first_var=1
second_var=1
if first_var=1 then if second_var=1 then CHECK 070, 044, 070, 24, "Cross", dir1, 0

will only show the check box when first_var = 1 and second_var = 1