Fork 0
mirror of https://github.com/FellippeHeitor/InForm.git synced 2024-05-12 06:50:12 +00:00
11 SetCaption
Fellippe Heitor edited this page 2020-10-31 11:26:18 -03:00

The SetCaption method changes a control's caption and parses for hot-key indicators.


SetCaption ControlID, "Caption"


SetCaption Button1, "&OK"

The ampersand symbol (&) is used to indicate that the following letter is going to be used as a hot-key, meaning that the user will be able to hold Alt and press the letter to activate this control.

You can use \n to add a line break in a caption and it'll be replaced with a CHR$(10). Line breaks work with Label and Progress bar controls that have the WordWrap property set to True.


The SetCaption method can be bypassed altogether as you can manipulate the Caption array directly, but by doing so the hot-key indicators and \n symbols won't be parsed.

Caption(Button1) = "Your caption"