Skip to main content

TdxNavBarCustomButtonPainter Class

Serves as the base for painter classes used to draw group header buttons in NavBar controls.

Declaration

TdxNavBarCustomButtonPainter = class(
    TObject
)

Remarks

This class provides the DrawButton method, which calls the virtual InternalDrawButton method. TdxNavBarCustomButtonPainter descendants override the InternalDrawButton method to custom paint group header buttons.

When you create a custom View for your NavBar control, you can provide your own painter of NavBar buttons. In this case, use TdxNavBarCustomButtonPainter or its descendant as the base class for your painter and implement the DrawButton method to draw the background as your needs dictate. Refer to the Registering Custom Views topic for more information.

The following table lists TdxNavBarCustomButtonPainter descendants and corresponding Views which use these painters. The last column shows the sample rectangles rendered by the DrawButton method. The method parameters were set as follows:

  • AColor1 to clBtnFace

  • AColor2 to clBtnFace

  • AAlphaBlend1 to 255

  • AAlphaBlend2 to 255

  • AState to [sSelected]

Descendant Comment Example
TdxNavBarBaseButtonPainter Used in BaseView Base Button Painter Example
TdxNavBarFlatButtonPainter Used in FlatView and XP1View Flat Button Painter Example
TdxNavBarVSToolBoxButtonPainter Used in VSToolBoxView Visual Studio-Style Toolbox Button Painter Example
TdxNavBarOfficeButtonPainter Used in Office1View, Office2View and Office3View Office Button Painter Example
TdxNavBarXPButtonPainter Used in XP2View Windows XP-Style Button Painter Example
TdxNavBarExplorerButtonPainter Used in ExplorerBarView and UltraFlatExplorerBarView Bar Explorer Button Painter Example
TdxNavBarOffice11NavPaneGroupButtonPainter Used in Office11NavigationPaneView Office 11-Style Navigation Pane Group Button Painter Example
TdxNavBarOffice11NavPaneButtonPainter Used in Office11NavigationPaneView Office 11-Style Navigation Pane Button Painter Example
TdxNavBarAdvExplorerButtonPainter Used in AdvExplorerBarView Advanced Explorer Button Painter Example
TdxNavBarXPExplorerBarButtonPainter Used in XPExplorerBarView Windows XP-Style Explorer Bar Button Painter Example

Inheritance

TObject
TdxNavBarCustomButtonPainter
See Also