private static readonly int dividerHeight = 2; // yet another guess // Constructor public ToolBar() : base() { base.Dock = DockStyle.Top; base.TabStop = false; buttons = new ToolBarButtonCollection(this); staticSize = DefaultSize; }
public TBBCEnumerator(ToolBarButtonCollection tbbc) { this.tbbc = tbbc; position = -1; count = tbbc.Count; generation = tbbc.generation; }
/// <include file='doc\ToolBar.uex' path='docs/doc[@for="ToolBar.ToolBar"]/*' /> /// <devdoc> /// <para>Initializes a new instance of the <see cref='System.Windows.Forms.ToolBar'/> class.</para> /// </devdoc> public ToolBar() : base() { // Set this BEFORE calling any other methods so that these defaults will be propagated toolBarState = new System.Collections.Specialized.BitVector32(TOOLBARSTATE_autoSize | TOOLBARSTATE_showToolTips | TOOLBARSTATE_divider | TOOLBARSTATE_dropDownArrows | TOOLBARSTATE_wrappable); SetStyle(ControlStyles.UserPaint, false); SetStyle(ControlStyles.FixedHeight, AutoSize); SetStyle(ControlStyles.FixedWidth, false); TabStop = false; Dock = DockStyle.Top; buttonsCollection = new ToolBarButtonCollection(this); }
public ToolBar () { background_color = ThemeEngine.Current.DefaultControlBackColor; foreground_color = ThemeEngine.Current.DefaultControlForeColor; buttons = new ToolBarButtonCollection (this); Dock = DockStyle.Top; GotFocus += new EventHandler (FocusChanged); LostFocus += new EventHandler (FocusChanged); MouseDown += new MouseEventHandler (ToolBar_MouseDown); MouseHover += new EventHandler (ToolBar_MouseHover); MouseLeave += new EventHandler (ToolBar_MouseLeave); MouseMove += new MouseEventHandler (ToolBar_MouseMove); MouseUp += new MouseEventHandler (ToolBar_MouseUp); BackgroundImageChanged += new EventHandler (ToolBar_BackgroundImageChanged); TabStop = false; SetStyle (ControlStyles.UserPaint, false); SetStyle (ControlStyles.FixedHeight, true); SetStyle (ControlStyles.FixedWidth, false); }
public ToolBar() { base.SetStyle(ControlStyles.UserPaint, false); base.SetStyle(ControlStyles.FixedHeight, this.AutoSize); base.SetStyle(ControlStyles.FixedWidth, false); this.TabStop = false; this.Dock = DockStyle.Top; this.buttonsCollection = new ToolBarButtonCollection(this); }