Caption
This property is a true example of polymorphism at work. It contains a user-definable string for every control that has a Caption, but the exact use of the string varies rather a lot from one control to the next.
Usage |
oObject.Caption = cCaptionString cCaptionString = oObject.Caption |
Headers can't handle hotkeys. That's okay—we're not totally sure what they'd mean there anyway. What's not okay is that when you type the hotkey characters "\<" into the Caption of a header, it leaves them there. That is, not only don't they get replaced with an underline, but they don't get removed from the string. You can sort of specify a hotkey for a header with "&", which is the Windows-standard character for hotkeys. When you do, you get an underlined letter, but that still doesn't actually give you a live hotkey—no event fires when the user presses Alt+the specified key. |
Example |
ThisForm.Caption = "Favorite Things" * You can change the title on the main Visual FoxPro window: _SCREEN.Caption = VERSION() * Here's a button with a hotkey: ThisForm.cmdClose.Caption = "\<Close" |
See Also |
Alignment, AutoSize, BorderStyle, Name, Picture, Set KeyComp, Style, TitleBar |