Share via


CMFCRibbonEdit Class

Implements an edit control that is located on a ribbon bar.

class CMFCRibbonEdit : public CMFCRibbonButton

Members

Public Constructors

Name

Description

CMFCRibbonEdit::CMFCRibbonEdit

Constructs a CMFCRibbonEdit object.

Public Methods

Name

Description

CMFCRibbonEdit::CanBeStretched

Indicates whether the height of the CMFCRibbonEdit control can increase vertically to the height of a ribbon row.

CMFCRibbonEdit::CMFCRibbonEdit

Constructs a CMFCRibbonEdit object.

CMFCRibbonEdit::CopyFrom

Copies the state of the specified CMFCRibbonEdit object to the current CMFCRibbonEdit object.

CMFCRibbonEdit::CreateEdit

Creates a new text box for the CMFCRibbonEdit object.

CMFCRibbonEdit::DestroyCtrl

Destroys the CMFCRibbonEdit object.

CMFCRibbonEdit::DropDownList

Drops down a list box.

CMFCRibbonEdit::EnableSpinButtons

Enables and sets the range of the spin button for the text box.

CMFCRibbonEdit::GetCompactSize

Retrieves the compact size of the CFMCRibbonEdit object.

CMFCRibbonEdit::GetEditText

Retrieves the text in the text box.

CMFCRibbonEdit::GetIntermediateSize

Retrieves the intermediate size of the CMFCRibbonEdit object.

CMFCRibbonEdit::GetTextAlign

Retrieves the alignment of the text in the text box.

CMFCRibbonEdit::GetWidth

Retrieves the width, in pixels, of the CMFCRibbonEdit control.

CMFCRibbonEdit::HasCompactMode

Indicates whether the display size for the CMFCRibbonEdit control can be compact.

CMFCRibbonEdit::HasFocus

Indicates whether the CMFCRIbbonEdit control has the focus.

CMFCRibbonEdit::HasLargeMode

Indicates whether the display size for the CMFCRibbonEdit control can be large.

CMFCRibbonEdit::HasSpinButtons

Indicates whether the text box has a spin button.

CMFCRibbonEdit::IsHighlighted

Indicates whether the CMFCRibbonEdit control is highlighted.

CMFCRibbonEdit::OnAfterChangeRect

Called by the framework when the dimensions of the display rectangle for the CMFCRibbonEdit control changes.

CMFCRibbonEdit::OnDraw

Called by the framework to draw the CMFCRibbonEdit control.

CMFCRibbonEdit::OnDrawLabelAndImage

Called by the framework to draw the label and image for the CMFCRibbonEdit control.

CMFCRibbonEdit::OnDrawOnList

Called by the framework to draw the CMFCRibbonEdit control in a commands list box.

CMFCRibbonEdit::OnEnable

Called by the framework to enable or disable the CMFCRibbonEdit control.

CMFCRibbonEdit::OnHighlight

Called by the framework when the pointer enters or leaves the bounds of the CMFCRibbonEdit control.

CMFCRibbonEdit::OnKey

Called by the framework when the user presses a keytip and the CMFCRibbonEdit control has the focus.

CMFCRibbonEdit::OnLButtonDown

Called by the framework to update the CMFCRibbonEdit control when the user presses the left mouse button on the control.

CMFCRibbonEdit::OnLButtonUp

Called by the framework when the user releases the left mouse button.

CMFCRibbonEdit::OnRTLChanged

Called by the framework to update the CMFCRibbonEdit control when the layout changes direction.

CMFCRibbonEdit::OnShow

Called by the framework to show or hide the CMFCRibbonEdit control.

CMFCRibbonEdit::Redraw

Updates the display of the CMFCRibbonEdit control.

CMFCRibbonEdit::SetACCData

Sets the accessibility data for the CMFCRibbonEdit object.

CMFCRibbonEdit::SetEditText

Sets the text in the text box.

CMFCRibbonEdit::SetTextAlign

Sets the text alignment of the text box.

CMFCRibbonEdit::SetWidth

Sets the width of the text box for the CMFCRibbonEdit control.

Example

The following example demonstrates how to construct a CMFCRibbonEdit object, show spin buttons next to the edit control, and set the text of the edit control. This code snippet is part of the MS Office 2007 Demo sample.

   CMFCRibbonEdit* pEditIndentLeft = new CMFCRibbonEdit(ID_PAGELAYOUT_INDENT_LEFT, 72, _T("Left:\nil"), 13);
    // specify the min and max value of the spin button control
    pEditIndentLeft->EnableSpinButtons(0, 1000);
    // set the text of the edit control
    pEditIndentLeft->SetEditText(_T("0"));

Requirements

Header: afxRibbonEdit.h

See Also

Reference

Hierarchy Chart

CMFCRibbonButton Class

CMFCRibbonBar Class

Other Resources

MFC Classes