WinForms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ButtonEditChildButton

    Show / Hide Table of Contents

    Class ButtonEditChildButton

    The ButtonEditChildButton class is used by the ButtonEdit class as its child buttons. This class is derived from the System.Windows.Forms.Button class. You will not need to create this control directly as it will be created through the ButtonEdit class.

    Inheritance
    System.Object
    ButtonAdv
    ButtonEditChildButton
    Implements
    IThemeProvider
    IVisualStyle
    ISupportOffice2007Theme
    ISupportThemeChanged
    System.Windows.Forms.IMessageFilter
    Inherited Members
    ButtonAdv.isLastLeftButton
    ButtonAdv.isFirstRightButton
    ButtonAdv.GetActiveThemeName()
    ButtonAdv.GetControlName()
    ButtonAdv.PaintButton(Graphics, ButtonAdv, Point)
    ButtonAdv.ShouldSerializeMetroColor()
    ButtonAdv.ResetMetroColor()
    ButtonAdv.Dispose(Boolean)
    ButtonAdv.ApplyScaleToControl(Single)
    ButtonAdv.OnFontChanged(EventArgs)
    ButtonAdv.ResetIsDropDownButton()
    ButtonAdv.ShouldSerializaIsDropDownButton()
    ButtonAdv.ShouldSerializeIsDropDownButton()
    ButtonAdv.OnPaint(PaintEventArgs)
    ButtonAdv.SetIgnoreMouse(Boolean)
    ButtonAdv.SuspendMouseState()
    ButtonAdv.ResumeMouseState()
    ButtonAdv.SetIsLastLeftButton(Boolean)
    ButtonAdv.SetIsFirstRightButton(Boolean)
    ButtonAdv.GetIsLastLeftButton()
    ButtonAdv.GetIsFirstRightButton()
    ButtonAdv.OnSystemColorsChanged(EventArgs)
    ButtonAdv.OnSizeChanged(EventArgs)
    ButtonAdv.OnButtonChanged(EventArgs)
    ButtonAdv.OnLostFocus(EventArgs)
    ButtonAdv.OnMouseMove(MouseEventArgs)
    ButtonAdv.OnHandleCreated(EventArgs)
    ButtonAdv.OnHandleDestroyed(EventArgs)
    ButtonAdv.OnKeyDown(KeyEventArgs)
    ButtonAdv.OnKeyUp(KeyEventArgs)
    ButtonAdv.ResetUseVisualStyle()
    ButtonAdv.ShouldSerializeUseVisualStyle()
    ButtonAdv.ResetComboEditBackColor()
    ButtonAdv.ShouldSerializeComboEditBackColor()
    ButtonAdv.ResetForeColor()
    ButtonAdv.ShouldSerializeForeColor()
    ButtonAdv.ResetBackColor()
    ButtonAdv.ShouldSerializeBackColor()
    ButtonAdv.RaisePaintEvent(PaintEventArgs)
    ButtonAdv.ISupportOffice2007Theme.EnableOffice2007Style()
    ButtonAdv.ISupportThemeChanged.ThemeChanged(Object, EventArgs)
    ButtonAdv.CanApplyTheme
    ButtonAdv.ThemeName
    ButtonAdv.CanOverrideStyle
    ButtonAdv.IThemeProvider.BaseThemeName
    ButtonAdv.IsVisualStyleEnabled
    ButtonAdv.ThemeStyle
    ButtonAdv.IThemeProvider.ControlName
    ButtonAdv.IVisualStyle.VisualTheme
    ButtonAdv.Office2007ColorScheme
    ButtonAdv.Office2010ColorScheme
    ButtonAdv.BorderStyleAdv
    ButtonAdv.KeepFocusRectangle
    ButtonAdv.MetroColor
    ButtonAdv.Font
    ButtonAdv.ForeColor
    ButtonAdv.BackColor
    ButtonAdv.ImageListAdv
    ButtonAdv.CustomManagedColor
    ButtonAdv.OverrideFormManagedColor
    ButtonAdv.Text
    ButtonAdv.State
    ButtonAdv.PushButton
    ButtonAdv.ResetStateOnLostFocus
    ButtonAdv.IsMouseDown
    ButtonAdv.IsComboButton
    ButtonAdv.ComboEditBackColor
    ButtonAdv.EnableTouchMode
    ButtonAdv.IsBackStageButton
    ButtonAdv.IsDropDownButton
    ButtonAdv.BeforeTouchSize
    ButtonAdv.ISupportOffice2007Theme.Office2007ColorTheme
    ButtonAdv.ThemeNameChanged
    ButtonAdv.ButtonChanged
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class ButtonEditChildButton : ButtonAdv, IThemeProvider, IVisualStyle, ISupportOffice2007Theme, ISupportThemeChanged, IMessageFilter
    Remarks

    The Buttons embedded in a ButtonEdit control need to abide by some constraints imposed by the layout and the settings of the ButtonEdit control. A customized Button control is needed for this purpose so that the relationship between the embedded child buttons and the parent ButtonEdit control can be established.

    Customizing the Button class to provide features suitable for use inside the ButtonEdit control also provides ease of use for users. The ButtonEditChildButton implements additional properties such as ButtonType (that allow you to choose different types of commonly used button icons).

    The ButtonEditChildButton also supports a listener model that notifies a listener when its size or alignment changes. The listener implements the IButtonEditParent interface to listen to these notifications.

    Constructors

    ButtonEditChildButton()

    Initializes a new instance of the ButtonEditChildButton class.

    Declaration
    public ButtonEditChildButton()
    Remarks

    The ButtonEditChildButton is created and assigned the constraints that need to be in place for it to be embedded in a ButtonEdit control.

    The ButtonType is initially set to Normal.

    Properties

    Appearance

    Gets the appearance of the button control

    Declaration
    public ButtonAppearance Appearance { get; }
    Property Value
    Type Description
    ButtonAppearance

    ButtonAlign

    Gets or sets the alignment of the button with respect to the edit control.

    Declaration
    public ButtonAlignment ButtonAlign { get; set; }
    Property Value
    Type Description
    ButtonAlignment
    Remarks

    The possible values for the ButtonAlign property are the values of the ButtonAlignment enumeration. Using the values of the enumeration the value can be set to be at the right or the left of the edit control.

    The default value for this property is Right

    ButtonEditParent

    Gets or sets the ButtonEdit control that is the parent and also the listener.

    Declaration
    public IButtonEditParent ButtonEditParent { get; set; }
    Property Value
    Type Description
    IButtonEditParent
    Remarks

    The ButtonEdit control implements the IButtonEditParent interface to act as a listener for change notifications from ButtonEditChildButton controls.

    ButtonType

    Gets / sets the ButtonTypes for this ButtonEditChildButton.

    Declaration
    public override ButtonTypes ButtonType { get; set; }
    Property Value
    Type Description
    ButtonTypes
    Overrides
    ButtonAdv.ButtonType
    Remarks

    Each of the ButtonTypes are associated with a commonly used button icon such as Up, down, undo, redo, etc. Choosing one of these types will set the Image property to one of the pre configured images.

    This dependence between the ButtonType and the Image is not maintained strictly and is meant to be a help to developers. You can specify any image you want for the button through the Image property.

    FirstRightButton

    Declaration
    protected bool FirstRightButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    FlatStyle

    Gets or sets the display of the control when users move the mouse over the control and click.

    Declaration
    public FlatStyle FlatStyle { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.FlatStyle

    Image

    Gets or sets the image based on the button style for the control.

    Declaration
    public Image Image { get; set; }
    Property Value
    Type Description
    System.Drawing.Image

    LastLeftButton

    Declaration
    protected bool LastLeftButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    Location

    Gets or sets the Location property. Cannot be changed.

    Declaration
    public Point Location { get; set; }
    Property Value
    Type Description
    System.Drawing.Point

    PreferredWidth

    Gets or sets the preferred width; the width set by the use, treated as the width of the ButtonEditChildButton control.

    Declaration
    public int PreferredWidth { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    The Size property and the PreferredWidth property are maintained in sync and the Size property will not allow the width property to be changed. Changes to the width of the button have to be set through the PreferredWidth property.

    Size

    Gets or sets the Size property.

    Declaration
    public Size Size { get; set; }
    Property Value
    Type Description
    System.Drawing.Size
    Remarks

    The Size property displays the size of the ButtonEditChildButton. The height of the button is fixed by the height of the ButtonEdit control and the width is specified through the PreferredWidth property.

    TabStop

    Gets or sets a value indicating whether the user can use the TAB key to give focus to the control.

    Declaration
    public bool TabStop { get; set; }
    Property Value
    Type Description
    System.Boolean

    UseVisualStyle

    Indicates whether to use visual styles.

    Declaration
    public override bool UseVisualStyle { get; set; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    ButtonAdv.UseVisualStyle
    Remarks

    Override required for hiding property from design time for user.

    Methods

    GetButtonImage(ButtonTypes)

    Returns the image for the specified button type.

    Declaration
    protected virtual Image GetButtonImage(ButtonTypes buttonType)
    Parameters
    Type Name Description
    ButtonTypes buttonType

    Button Types

    Returns
    Type Description
    System.Drawing.Image

    returns image

    Remarks

    This dependence between the ButtonType and the Image is not maintained strictly and is meant to be a help to developers. You can specify any image you want for the button through the Image property.

    OnClick(EventArgs)

    Overrides the OnClick method. Set focus to parent control when needed.

    Declaration
    protected override void OnClick(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The click event data.

    Overrides
    ButtonAdv.OnClick(EventArgs)

    OnMouseDown(MouseEventArgs)

    Declaration
    protected override void OnMouseDown(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e
    Overrides
    ButtonAdv.OnMouseDown(MouseEventArgs)

    OnMouseEnter(EventArgs)

    Declaration
    protected override void OnMouseEnter(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e
    Overrides
    ButtonAdv.OnMouseEnter(EventArgs)

    OnMouseLeave(EventArgs)

    Declaration
    protected override void OnMouseLeave(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e
    Overrides
    ButtonAdv.OnMouseLeave(EventArgs)

    OnMouseUp(MouseEventArgs)

    Declaration
    protected override void OnMouseUp(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e
    Overrides
    ButtonAdv.OnMouseUp(MouseEventArgs)

    SetAppearance(ButtonAppearance)

    Sets the appearance of the button control.

    Declaration
    public void SetAppearance(ButtonAppearance appearance)
    Parameters
    Type Name Description
    ButtonAppearance appearance

    The appearance to be set.

    SetAppearance(ButtonAppearance, Color)

    Sets the appearance of the button control.

    Declaration
    public void SetAppearance(ButtonAppearance appearance, Color metroColor)
    Parameters
    Type Name Description
    ButtonAppearance appearance

    The appearance to be set.

    System.Drawing.Color metroColor

    Implements

    IThemeProvider
    IVisualStyle
    ISupportOffice2007Theme
    ISupportThemeChanged
    System.Windows.Forms.IMessageFilter
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved