Form

GPALLinkLabel

Everything on Settings Every Control Takes applies here too. GPAL.LinkLabel builds one, WithUrl sets the address it opens, and WithText sets what it says. Clicking it opens the address in the default browser; with no WithUrl it opens its own text, when that text is an address. A callback given with WithCallback runs on the click as well, and a shortcut key given with WithShortcutKey opens it too. GPAL.LinkLabelFor(url) is the shorthand, and shows the address itself as the text.

WARNING

WithText moves the chain on to the font settings, so WithUrl has to be called first.

Examples

GPAL Fluent: High-level fluent C# API

//The first link says what it is and opens the Bot of the Week page. The second, built with LinkLabelFor, shows the address it opens.

static GPALLinkLabel moreBots = (GPALLinkLabel)GPAL.LinkLabel

.WithUrl("https://gpal.sditx.com/docs/botw")

.WithText("More Bots of the Week");


GPAL.Form

.WithTitle("About")

.WithFormControl(GPAL.LabelFor("A GPAL Bot of the Week."))

.WithFormControl(moreBots)

.WithFormControl(GPAL.LinkLabelFor("https://gpal.sditx.com/"))

.ShowDialog();

💬 Ask GPAL