Defines a text label.

dlgLabel(string Text [, int Update])

The dlgLabel statement defines a label with the given Text.

Text can be either a string literal, as in "Hello", or a string variable.

If the Update parameter is not 0 and Text is a string variable, its contents can be modified in the statement of, e.g., a dlgPushButton, and the label will be automatically updated. This, of course, is only useful if Text is a dedicated string variable (not, e.g., the loop variable of a for statement).

If Text contains an '&', the character following the ampersand will become a hotkey, and when the user hits Alt+hotkey, the focus will go to the object that was defined immediately following the dlgLabel. To have an actual '&' character in the text it has to be escaped.

See also Layout Information, A Complete Example, dlgRedisplay()


string OS = "Windows";
dlgHBoxLayout {
  dlgLabel(OS, 1);
  dlgPushButton("&Change OS") { OS = "Linux"; }

Index Copyright © 2005 CadSoft Computer GmbH