Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomButton Class

Represents an enhanced variant of the TButton component.

#Declaration

#Remarks

TcxCustomButton can work in three different modes, which can be activated via the Kind property. In standard mode, the TcxCustomButton functions as a regular button. If the Kind property is set to the cxbkDropDown, cxbkDropDownButton, or cxbkOfficeDropDown and the DropDownMenu property is assigned a popup menu component, clicking a button (or the dropdown button located at the right side of this button) results in opening the specified popup menu. When in cxbkDropDown mode, TcxCustomButton does not generate the OnClick event when a user presses it. Instead, handle the OnPopup event of the specified dropdown menu or the button’s OnDropDownMenuPopupEx or OnDropDownMenuPopup event, to respond to invoking the dropdown menu.

With TcxCustomButton, you can mimic the appearance and behavior of standard VCL TSpeedButton controls. To accomplish this, use the SpeedButtonOptions properties.

The look & feel of the button can be specified via the LookAndFeel property. The LookAndFeel.NativeStyle property determines whether the button is painted using the native style. The LookAndFeel.Kind property specifies the borders, colors and highlighting settings applied to a button. You can also apply skins via the LookAndFeel.SkinName property or completely custom paint the button by handling the OnCustomDraw event.

Button image options are specified via the button’s OptionsImage property.

See Also