Skip to main content
All docs
V19.1

Border and Button Styles

  • 2 minutes to read

Each control provided by the XtraEditors library supports the Look And Feel mechanism which allows you to customize the overall look and feel of the control. The look and feel settings determine the painting scheme applied to the control. By default the look and feel specifies how borders, buttons and dropdowns are painted. This topic shows how to override the default painting styles for these elements.

Using Border and Button Styles

Controls that aren’t available as inplace editors provide a BaseControl.BorderStyle property which specifies the paint style of the border.

Editors derived from the BaseEdit class (which can be used inplace, e.g. within the XtraGrid) provide the following style properties:

Initially, these properties are set to the Default values. In this case an editor’s corresponding element is painted using the LookAndFeel settings. If a property is set to any other value the editor’s element will be painted using the corresponding scheme and the look and feel settings for this element will be ignored.

The available border and button styles (values that can be assigned to the style properties above) are listed below:

  • Flat - borders and buttons are flat.

    ButtonBorderStyleFlat

  • HotFlat - borders are flat and represented by a single light gray line. Buttons are also flat and highlighted when hot-tracked.

    ButtonBorderStyle_HotFlatButtonBorderStyle_HotFlat_Focused

  • NoBorder - no borders are shown. Buttons are flat.

    ButtonBorderStyle_NoBorder

  • Simple - borders are flat and represented by a single dark gray line. Buttons are flat and have a single dark gray line border.

    ButtonBorderStyle_Simple

  • Style3D - borders and buttons are painted in the 3D style.

    ButtonBorderStyle_Style3D

  • UltraFlat - the Office XP style emulation. Borders and buttons are highlighted when hot-tracked or focused. Otherwise, no borders are displayed.

    ButtonBorderStyle_UltraFlat ButtonBorderStyle_UltraFlat_Focused

See Also