Class ButtonBar
ButtonBar is a base class for displaying several buttons in one bar. It is used by RecordNavigationBar and TabBar.
Namespace: Syncfusion.Windows.Forms
Assembly: Syncfusion.Shared.Base.dll
Syntax
public class ButtonBar : Control, IControlToolTipProvider, ICancelModeProvider, ISupportUpdating
Constructors
ButtonBar()
Initializes a new button bar.
Declaration
public ButtonBar()
Properties
ButtonBarChild
Gets or sets a Syncfusion.Windows.Forms.InternalButtonBar that holds an array of buttons.
Declaration
public InternalButtonBar ButtonBarChild { get; set; }
Property Value
Type |
---|
Syncfusion.Windows.Forms.InternalButtonBar |
ButtonLook
Gets or sets the button look for the arrow buttons.
Declaration
public ButtonLook ButtonLook { get; set; }
Property Value
Type |
---|
ButtonLook |
DefaultSize
Returns the default size of the control.
Declaration
protected override Size DefaultSize { get; }
Property Value
Type |
---|
System.Drawing.Size |
ShowToolTips
Indicates whether ToolTips are being shown for tabs that have ToolTips set on them.
Declaration
public bool ShowToolTips { get; set; }
Property Value
Type |
---|
System.Boolean |
Updating
Indicates whether BeginUpdate() was called.
Declaration
public bool Updating { get; }
Property Value
Type |
---|
System.Boolean |
Methods
BeginUpdate()
Suspends updating the bar.
Declaration
public void BeginUpdate()
ComputeButtonBarChildBounds()
Returns the bounds for the button bar.
Declaration
protected virtual Rectangle ComputeButtonBarChildBounds()
Returns
Type | Description |
---|---|
System.Drawing.Rectangle | A System.Drawing.Rectangle indicating where the bar should be drawn. |
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
EndUpdate()
Resumes updating the bar and refreshes it.
Declaration
public void EndUpdate()
EndUpdate(Boolean)
Resumes updating the bar and optionally refreshes it.
Declaration
public void EndUpdate(bool refresh)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | refresh | Indicates whether button bar should be refreshed; if False button will only be refreshed when it is marked dirty. |
OnButtonBarMouseDown(MouseEventArgs)
Raises the ButtonBarMouseDown event.
Declaration
protected virtual void OnButtonBarMouseDown(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e | A System.Windows.Forms.MouseEventArgs that contains the event data. |
OnButtonLookChanged(EventArgs)
Raises the ButtonLookChanged event.
Declaration
protected virtual void OnButtonLookChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | Event data. |
OnCancelMode(EventArgs)
Raises the CancelMode event.
Declaration
protected virtual void OnCancelMode(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | Event data. |
OnCreateButtonBarChild()
Creates an instance of the Syncfusion.Windows.Forms.InternalButtonBar and initializes it with the layout information.
Declaration
protected virtual InternalButtonBar OnCreateButtonBarChild()
Returns
Type | Description |
---|---|
Syncfusion.Windows.Forms.InternalButtonBar | The initialized Syncfusion.Windows.Forms.InternalButtonBar. |
OnFontChanged(EventArgs)
Declaration
protected override void OnFontChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
OnHandleDestroyed(EventArgs)
Declaration
protected override void OnHandleDestroyed(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
OnLayout(LayoutEventArgs)
Declaration
protected override void OnLayout(LayoutEventArgs levent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.LayoutEventArgs | levent |
OnMouseDown(MouseEventArgs)
Declaration
protected override void OnMouseDown(MouseEventArgs mevent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | mevent |
OnMouseUp(MouseEventArgs)
Declaration
protected override void OnMouseUp(MouseEventArgs mevent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | mevent |
OnPaint(PaintEventArgs)
Declaration
protected override void OnPaint(PaintEventArgs pe)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.PaintEventArgs | pe |
Refresh()
Forces the control to invalidate its client area and immediately redraw itself and any child controls.
Declaration
public override void Refresh()
ResetToolTips()
Reinitializes and hides ToolTips.
Declaration
public virtual void ResetToolTips()
WndProc(ref Message)
Declaration
protected override void WndProc(ref Message m)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Message | m |
Events
ButtonBarMouseDown
Occurs before the System.Windows.Forms.Control.MouseDown event is raised.
Declaration
public event MouseEventHandler ButtonBarMouseDown
Event Type
Type |
---|
System.Windows.Forms.MouseEventHandler |
ButtonLookChanged
Occurs when ButtonLook is changed.
Declaration
public event EventHandler ButtonLookChanged
Event Type
Type |
---|
System.EventHandler |
CancelMode
Occurs when a WM_CANCELMODE is received.
Declaration
public event EventHandler CancelMode
Event Type
Type |
---|
System.EventHandler |
Explicit Interface Implementations
IControlToolTipProvider.GetControlToolTip()
Declaration
ControlToolTip IControlToolTipProvider.GetControlToolTip()
Returns
Type |
---|
ControlToolTip |
ISupportUpdating.Updating
Declaration
bool ISupportUpdating.Updating { get; }
Returns
Type |
---|
System.Boolean |