Difference between revisions of "DesktopCheckBox.Caption"
From Xojo Documentation
(Created page with "N/A") |
|||
Line 1: | Line 1: | ||
− | + | {{PropertyBox | |
+ | | owner=DesktopCheckBox | ||
+ | | name=Caption | ||
+ | | type=[[String]] | ||
+ | | newinversion=2021r3 | ||
+ | }} | ||
+ | {{Description | ||
+ | |text = The caption of a checkbox.}} | ||
+ | |||
+ | ==Notes== | ||
+ | This property can be set inside the IDE or programmatically. | ||
+ | |||
+ | To set an accelerator character, precede the character in the Caption with an ampersand. In order to show an ampersand in the Caption, use two ampersands in a row. | ||
+ | |||
+ | == Sample Code == | ||
+ | This code sets the caption of the control to "OK". | ||
+ | <rbcode> | ||
+ | Me.Caption = "OK" | ||
+ | </rbcode> | ||
+ | |||
+ | This code in the Pressed event handler for a [[DesktopButton]] changes the text of the button each time it is clicked: | ||
+ | <rbcode> | ||
+ | If Me.Caption = "Blue" Then | ||
+ | Me.Caption = "Red" | ||
+ | Else | ||
+ | Me.Caption = "Blue" | ||
+ | End If | ||
+ | </rbcode> |
Latest revision as of 18:22, 23 July 2021
Property (As String )
aDesktopCheckBox.Caption = newStringValue
or
StringValue = aDesktopCheckBox.Caption
New in 2021r3
Supported for all project types and targets.
or
StringValue = aDesktopCheckBox.Caption
New in 2021r3
Supported for all project types and targets.
The caption of a checkbox.
Notes
This property can be set inside the IDE or programmatically.
To set an accelerator character, precede the character in the Caption with an ampersand. In order to show an ampersand in the Caption, use two ampersands in a row.
Sample Code
This code sets the caption of the control to "OK".
Me.Caption = "OK"
This code in the Pressed event handler for a DesktopButton changes the text of the button each time it is clicked: