The ButtonBar.Colors class gets, sets or resets the display colors of a Windows Forms ButtonBar control. By default the display colors depend on sytem colors. With this class all colors can be individually designed. The colors are only used when the button bar's BorderStyle and ButtonStyle property have been set to ColorScheme.

Syntax

public class ButtonBar.Colors
Public Class ButtonBar.Colors

Introduced: 15.1.

Examples

In this example a ButtonBar is created and its display colors is defined via this ButtonBar.Colors class. The properties 'BorderStyle' and 'ButtonStyle' are set to 'ColorScheme' - this enables the usage of user defined colors.

TXTextControl.ButtonBar buttonBar1 = new TXTextControl.ButtonBar();
buttonBar1.ButtonStyle = TXTextControl.ButtonStyle.ColorScheme;
buttonBar1.ButtonPositions = new TXTextControl.Button[] {
                             TXTextControl.Button.FontBoldButton,
                             TXTextControl.Button.FontItalicButton };
buttonBar1.BorderStyle = TXTextControl.ButtonBarBorderStyle.ColorScheme;

TXTextControl.ButtonBar.Colors colors = new TXTextControl.ButtonBar.Colors();
colors.BackColor = System.Drawing.Color.White;

buttonBar1.DisplayColors = colors;
Dim buttonBar1 As TXTextControl.ButtonBar = New TXTextControl.ButtonBar()
buttonBar1.ButtonStyle = TXTextControl.ButtonStyle.ColorScheme
buttonBar1.ButtonPositions = New TXTextControl.Button() {TXTextControl.Button.FontBoldButton, TXTextControl.Button.FontItalicButton}
buttonBar1.BorderStyle = TXTextControl.ButtonBarBorderStyle.ColorScheme
Dim colors As TXTextControl.ButtonBar.Colors = New TXTextControl.ButtonBar.Colors()
colors.BackColor = System.Drawing.Color.White
buttonBar1.DisplayColors = colors

Constructors

Constructor Description
Colors Initializes a new instance of the ButtonBar.Colors class.

Methods

Method Description
ResetBackColor Resets the button bar's BackColor to its system dependent default value.
ResetButtonBackColorBottom Resets the button bar's ButtonBackColorBottom to its system dependent default value.
ResetButtonBackColorMiddle Resets the button bar's ButtonBackColorMiddle to its system dependent default value.
ResetButtonBackColorTop Resets the button bar's ButtonBackColorTop to its system dependent default value.
ResetButtonFrameColor Resets the button bar's ButtonFrameColor to its system dependent default value.
ResetButtonHotTrackBottom Resets the button bar's ButtonHotTrackBottom to its system dependent default value.
ResetButtonHotTrackTop Resets the button bar's ButtonHotTrackTop to its system dependent default value.
ResetButtonPressedBottom Resets the button bar's ButtonPressedBottom to its system dependent default value.
ResetButtonPressedTop Resets the button bar's ButtonPressedTop to its system dependent default value.
ResetButtonSelectedBottom Resets the button bar's ButtonSelectedBottom to its system dependent default value.
ResetButtonSelectedTop Resets the button bar's ButtonSelectedTop to its system dependent default value.
ResetComboBoxBackColor Resets the button bar's ComboBoxBackColor to its system dependent default value.
ResetForeColor Resets the button bar's ForeColor to its system dependent default value.
ResetGradientBackColor Resets the button bar's GradientBackColor to its system dependent default value.
ResetSeparatorColorDark Resets the button bar's SeparatorColorDark to its system dependent default value.
ResetSeparatorColorLight Resets the button bar's SeparatorColorLight to its system dependent default value.

Properties

Property Description
BackColor Gets or sets the background color at the left edge of the button bar.
ButtonBackColorBottom Gets or sets the background color at the bottom of a button.
ButtonBackColorMiddle Gets or sets the background color in the middle of a button.
ButtonBackColorTop Gets or sets the background color at the top of a button.
ButtonFrameColor Gets or sets the frame color of a selected or pressed button.
ButtonHotTrackBottom Gets or sets the background color at the bottom of a button, if the mouse cursor is over the button.
ButtonHotTrackTop Gets or sets the background color at the top of a button, if the mouse cursor is over the button.
ButtonPressedBottom Gets or sets the background color at the bottom of a button used when the button is pressed down.
ButtonPressedTop Gets or sets the background color at the top of a button used when the button is pressed down.
ButtonSelectedBottom Gets or sets the background color at the bottom of a button used when the button is selected.
ButtonSelectedTop Gets or sets the background color at the top of a button used when the button is selected.
ComboBoxBackColor Gets or sets the background color of the combo boxes.
ForeColor Gets or sets the color used for text and the button images.
GradientBackColor Gets or sets the background color at the right edge of the button bar.
SeparatorColorDark Gets or sets the color of the dark part of a separator.
SeparatorColorLight Gets or sets the color of the light part of a separator.