Form

GPALCheckBox

Everything on Settings Every Control Takes applies here too. GPAL.Checkbox builds one and WithText sets the label beside it. WithChecked presets its state, and the Checked property reads and writes that state while the form is up. CheckedChanged is its primary event. A checkbox contributes true or false to the form's data grid when the form is read back. GPAL.CheckboxFor(text, isChecked) is the shorthand.

Examples

GPAL Fluent: High-level fluent C# API

//WithChecked belongs before WithName. Checked is a property rather than a fluent call, so it is read and written any time, from the workflow thread or a handler, and GPAL marshals it.

GPALCheckbox headless = (GPALCheckbox)GPAL.Checkbox

.WithChecked(true)

.WithText("Run headless")

.WithCallback<EventHandler>(ModeChanged)

.WithName("headless");


void ModeChanged(object sender, EventArgs e)

{

// the checkbox decides whether another control is even usable

windowSize.Enabled = false == headless.Checked;

}


// and straight from the workflow, once the form is closed

bool runHeadless = headless.Checked;

💬 Ask GPAL