Form

Form Layout and Controls

Methods for configuring the GPALForm window - title, size, position, and which controls it contains.

Methods for configuring the GPALForm window - title, size, position, and which controls it contains.

WithTitle sets the text that appears in the form's title bar. WithWidth and WithHeight set the initial window size in pixels. WithLeft and WithTop set the initial screen position of the form window. WithFormControl adds a control (GPALButton, GPALChart, GPALInput, etc.) to the form. Multiple WithFormControl calls build up the control list. The form and its controls are the foundation for interactive GPAL workflows and for the AI ShowForm integration.

Examples

GPAL Fluent: High-level fluent C# API

//WithFormControl accepts any form control that implements the required interface. Controls are arranged on the form in the order they are added. Use the form control subsystem (GPAL.Button, GPAL.Input, etc.) to build each control before adding it.

// Build a simple data entry form var form = GPAL.Form .WithTitle("Customer Entry") .WithWidth(600) .WithHeight(400) .WithLeft(100) .WithTop(100) .WithFormControl((Input)GPAL.Input .WithText("Customer Name")) .WithFormControl((Input)GPAL.Input .WithText("Email Address")) .WithFormControl((Button)GPAL.Button .WithText("Submit")) .ToGPALObject();