BCGControlBar Pro for MFC
CBCGPRibbonFontComboBox

Detailed Description

The CBCGPRibbonFontComboBox class provides the functionality that allows to place combo boxes with list of fonts on ribbon panels.

Construct a ribbon font combo box button as following:

Copy
UINT nID,
int nFontType = DEVICE_FONTTYPE | RASTER_FONTTYPE | TRUETYPE_FONTTYPE,
BYTE nCharSet = DEFAULT_CHARSET,
BYTE nPitchAndFamily = DEFAULT_PITCH,
int nWidth = -1),

where

When a combo box object has been constructed you can add it to a panel using CBCGPRibbonPanel::Add.

+ Inheritance diagram for CBCGPRibbonFontComboBox:

Public Member Functions

 CBCGPRibbonFontComboBoxConstructs ribbon combo box object.
 
 SetFontLooks for the specified font and selects it in the combo.
 
- Public Member Functions inherited from CBCGPRibbonComboBox
 CBCGPRibbonComboBoxConstructs ribbon combo box object.
 
 AddItemAdds a new item and returns the index of added item.
 
 DeleteItemDeletes an item from combo box.
 
 DeleteItemDeletes an item from combo box.
 
 DeleteItemDeletes an item from combo box.
 
 EnableAutoCompleteTurns autocomplete mode on or off.
 
 EnableCalculatorPuts a Ribbon combo box control in "Calculator" mode.
 
 EnableDropDownListResizeEnables or disables resizing of drop down list.
 
 FindItemFinds item in combo box and retuns its index.
 
 GetCountReturns the number of items in combo box.
 
 GetCurSelReturns zero-based index of currently selected item.
 
 GetItemReturns an item located at the specified index.
 
 GetItemDataReturns a user-defined data associated with an item located at the specified index.
 
 HasEditBoxTells whether combo box has edit box.
 
 InsertItemInserts a new item into combo box.
 
 IsAutoCompleteEnabledSpecifies whether auto complete mode is enabled, or disabled.
 
 IsCalculatorEnabledTells whether a Ribbon combo box works in "Calculator" mode.
 
 IsResizeDropDownListTells whether the drop down list of ribbon combo box can be resized, or not.
 
 OnCalculatorUserCommandCalled by the library when a custom calculator command is invoked.
 
 OnSelectItemCalled when an item has been selected in combo box.
 
 RemoveAllItemsRemoves all items from combo box.
 
 SelectItemSelects an item in combo box.
 
 SelectItemSelects an item in combo box.
 
 SelectItemSelects an item in combo box.
 
 SetDropDownHeightSets the height of drop down part of combo box.
 
- Public Member Functions inherited from CBCGPRibbonEdit
 CreateEditCreates in-place edit control.
 
 EnableSearchModeDisplays or hides "Find" and "Clear" icons at the right side of edit control.
 
 EnableSpinButtonsShows or hides spin buttons at the right side of edit control.
 
 GetEditTextObtains text from edit box.
 
 GetPromptReturns a prompt (displayed when the edit box text is empty).
 
 GetSearchPromptReturns default text displayed within edit control in "search" mode.
 
 GetTextAlignReturns alignment of text.
 
 IsReadOnlyTells whether the Ribbon edit box is read-only or not.
 
 IsSearchModeTells whether "search" mode has been enabled for the edit control.
 
 SetEditTextSets a text to edit control..
 
 SetReadOnlySets or unsets read-only flag of the Ribbon edit box.
 
 SetTextAlignSets alignment of text.
 
 SetWidthSets the width of CBCGPRibbonEdit control.
 
- Public Member Functions inherited from CBCGPRibbonButton
 CBCGPRibbonButtonConstruct ribbon button object.
 
 CBCGPRibbonButtonConstruct ribbon button object.
 
 CBCGPRibbonButtonConstruct ribbon button object.
 
 AddSubItemAllows to create a popup menu on the fly by dynamically adding new ribbon elements.
 
 ClosePopupDlgCalled by the framework when the popup dialog is closed.
 
 EnablePopupDialogEnables the popup dialog associated with this button.
 
 EnablePopupDialogEnables the popup dialog associated with this button.
 
 FindSubItemIndexByIDReturns index of sub-item by its command ID.
 
 GetImageIndexReturns button's image index in associated image list.
 
 GetMenuReturns a handle to Windows menu assigned to button.
 
 IsDefaultCommandTells whether button can execute its default command.
 
 IsRightAlignMenuTells whether the menu is right aligned, or not.
 
 OnBeforeShowPopupDlgCalled by the framework before the popup dialog is displayed.
 
 OnClickCalled by the framework when user clicks a button.
 
 RemoveAllSubItemsRemoves all menu items from popup menu.
 
 RemoveSubItemRemoves a sub-item.
 
 SetAlwaysLargeImageEnables or disables transition to collapsed state.
 
 SetDefaultCommandTells the button that it can execute its default command.
 
 SetImageIndexSets button's image index in associated image list.
 
 SetMenuAssigns a popup menu to ribbon button.
 
 SetMenuAssigns a popup menu to ribbon button.
 
 SetRightAlignMenuSets popup menu alignment.
 
- Public Member Functions inherited from CBCGPBaseRibbonElement
 CanBeRemovedFromQATTells whether ribbon element can be removed from QAT.
 
 GetApplicationModesGets application modes where this control is visible.
 
 GetCursorAllows to specify a Ribbon control's custom mouse cursor.
 
 GetDataRetrieves a user-defined data associated with ribbon element.
 
 GetDescriptionReturns ribbon element description.
 
 GetIDReturns ribbon element command ID.
 
 GetKeysReturns key tip associated with ribbon element.
 
 GetMenuKeysReturns key tips associated with split button.
 
 GetRectReturns bounding rectangle of ribbon element.
 
 GetSizeReturns current size of ribbon element.
 
 GetTextReturns ribbon element text.
 
 IsBackstageViewModeTells whether a ribbon element works in "backstage view" mode.
 
 IsCheckedTells whether ribbon element is checked.
 
 IsCompactModeTells whether ribbon element is in compact mode.
 
 IsDisabledTells whether ribbon element is disabled.
 
 IsFocusedTells whether ribbon element is focused.
 
 IsPressedTells whether ribbon element is pressed.
 
 SetDataAssociates a user-defined data with ribbon element.
 
 SetIDSets command ID of ribbon element.
 
 SetKeysSets a key tip for ribbon element.
 
 SetToolTipTextSets tooltip text for ribbon element.
 

Additional Inherited Members

- Public Types inherited from CBCGPBaseRibbonElement
enum  RibbonElementLocation
 
- Protected Member Functions inherited from CBCGPRibbonComboBox
 OnCompareStrings/// Called by the framework when it needs to compare two Ribbon combo box items.
 
- Protected Member Functions inherited from CBCGPRibbonEdit
 CommonInitCreates the spin control.
 
- Protected Member Functions inherited from CBCGPBaseRibbonElement
 OnBeforeDestroyParentMenuBarCalled by the framework before the parent menu windo is destroyed.
 
 OnProcessKeyCalled by the framework when a ribbon element should process keyboard input.