EAGLE Help

dlgCheckBox


Function
Defines a checkbox.

Syntax
dlgCheckBox(string Text, int &Checked) [ statement ]

Description
The dlgCheckBox statement defines a check box with the given Text.

If Text contains an '&', the character following the ampersand will become a hotkey, and when the user hits Alt+hotkey, the checkbox will be toggled. To have an actual '&' character in the text it has to be escaped.

dlgCheckBox is mainly used within a dlgGroup, but can also be used otherwise.
All check boxes within the same dialog must have different Checked variables!

If the user checks a dlgCheckBox, the associated Checked variable is set to 1, otherwise it is set to 0. The initial value of Checked defines whether a checkbox is initially checked. If Checked is not equal to 0, the checkbox is initially checked.

The optional statement is executed every time the dlgCheckBox is toggled.

See also dlgRadioButton, dlgGroup, Layout Information, A Complete Example

Example

int mirror = 0;
int rotate = 1;
int flip   = 0;
dlgGroup("Orientation") {
  dlgCheckBox("&Mirror", mirror);
  dlgCheckBox("&Rotate", rotate);
  dlgCheckBox("&Flip", flip);
  }

Index Copyright © 2005 CadSoft Computer GmbH