CMFCRibbonBaseElement::SetText

Sets the text and keytip for the ribbon element.

virtual void SetText(
   LPCTSTR lpszText 
);

Parameters

  • [in] lpszText
    The text and keytip for the ribbon element.

Remarks

To set the keytip for the ribbon element, append the newline escape sequence followed by the keytip characters to lpszText.

Example

//Set the text for the ribbon element
SetText(_T("Margins"))
//Set the text and a single-letter keytip
SetText(_T("Margins\nm"))
//Set the text and a multiple-letter keytip
SetText(_T("Line Numbers\nln"))

Requirements

Header: afxbaseribbonelement.h

See Also

Reference

CMFCRibbonBaseElement Class

Hierarchy Chart