public UpDownEditAccessibleObject(UpDownEdit owner, UpDownBase parent) : base(owner) { _parent = parent ?? throw new ArgumentNullException(nameof(parent)); _owningUpDownEdit = owner; _textProvider = new TextBoxBaseUiaTextProvider(owner); UseTextProviders(_textProvider, _textProvider); }
public UpDownBase() { if (DpiHelper.IsScalingRequired) { _defaultButtonsWidth = LogicalToDeviceUnits(DefaultButtonsWidth); } _upDownButtons = new UpDownButtons(this); _upDownEdit = new UpDownEdit(this) { BorderStyle = BorderStyle.None, AutoSize = false }; _upDownEdit.KeyDown += new KeyEventHandler(OnTextBoxKeyDown); _upDownEdit.KeyPress += new KeyPressEventHandler(OnTextBoxKeyPress); _upDownEdit.TextChanged += new EventHandler(OnTextBoxTextChanged); _upDownEdit.LostFocus += new EventHandler(OnTextBoxLostFocus); _upDownEdit.Resize += new EventHandler(OnTextBoxResize); _upDownButtons.TabStop = false; _upDownButtons.Size = new Size(_defaultButtonsWidth, PreferredHeight); _upDownButtons.UpDown += new UpDownEventHandler(OnUpDown); Controls.AddRange(new Control[] { _upDownButtons, _upDownEdit }); SetStyle(ControlStyles.Opaque | ControlStyles.FixedHeight | ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.StandardClick, false); SetStyle(ControlStyles.UseTextForAccessibility, false); }
public UpDownEditAccessibleObject(UpDownEdit owner, UpDownBase parent) : base(owner) { _parent = parent.OrThrowIfNull(); _owningUpDownEdit = owner; _textProvider = new TextBoxBaseUiaTextProvider(owner); UseTextProviders(_textProvider, _textProvider); }
public UpDownBase() { this.upDownButtons = new UpDownButtons(this); this.upDownEdit = new UpDownEdit(this); this.upDownEdit.BorderStyle = System.Windows.Forms.BorderStyle.None; this.upDownEdit.AutoSize = false; this.upDownEdit.KeyDown += new KeyEventHandler(this.OnTextBoxKeyDown); this.upDownEdit.KeyPress += new KeyPressEventHandler(this.OnTextBoxKeyPress); this.upDownEdit.TextChanged += new EventHandler(this.OnTextBoxTextChanged); this.upDownEdit.LostFocus += new EventHandler(this.OnTextBoxLostFocus); this.upDownEdit.Resize += new EventHandler(this.OnTextBoxResize); this.upDownButtons.TabStop = false; this.upDownButtons.Size = new Size(0x10, this.PreferredHeight); this.upDownButtons.UpDown += new UpDownEventHandler(this.OnUpDown); base.Controls.AddRange(new Control[] { this.upDownButtons, this.upDownEdit }); base.SetStyle(ControlStyles.FixedHeight | ControlStyles.ResizeRedraw | ControlStyles.Opaque, true); base.SetStyle(ControlStyles.StandardClick, false); base.SetStyle(ControlStyles.UseTextForAccessibility, false); }
public UpDownBase() : base() { textAlignment = HorizontalAlignment.Left; base.BorderStyleInternal = DefaultBorderStyle; upDownEdit = new UpDownEdit(this); upDownEdit.AutoSize = true; upDownEdit.ReadOnly = false; upDownEdit.BorderStyle = BorderStyle.None; upDownEdit.KeyDown += new KeyEventHandler(OnTextBoxKeyDown); upDownEdit.KeyPress += new KeyPressEventHandler(OnTextBoxKeyPress); upDownEdit.LostFocus += new EventHandler(OnTextBoxLostFocus); upDownEdit.Resize += new EventHandler(OnTextBoxResize); upDownEdit.TextChanged += new EventHandler(OnTextBoxTextChanged); upDownButtons = new UpDownButtons(this); upDownButtons.TabStop = false; upDownButtons.UpDown += new UpDownEventHandler(upDownButtons_UpDown); upDownAlign = LeftRightAlignment.Right; interceptArrowKeys = true; base.Size = ClientToBounds(new Size(upDownEdit.Width + DefaultButtonsWidth, upDownEdit.Height)); Controls.AddRange(new Control[] { upDownButtons, upDownEdit }); }
public UpDownBase() : base() { textAlignment = HorizontalAlignment.Left; base.BorderStyleInternal = DefaultBorderStyle; upDownEdit = new UpDownEdit(this); upDownEdit.AutoSize = true; upDownEdit.ReadOnly = false; upDownEdit.BorderStyle = BorderStyle.None; upDownEdit.KeyDown += new KeyEventHandler(OnTextBoxKeyDown); upDownEdit.KeyPress += new KeyPressEventHandler(OnTextBoxKeyPress); upDownEdit.LostFocus += new EventHandler(OnTextBoxLostFocus); upDownEdit.Resize += new EventHandler(OnTextBoxResize); upDownEdit.TextChanged += new EventHandler(OnTextBoxTextChanged); upDownButtons = new UpDownButtons(this); upDownButtons.TabStop = false; upDownButtons.UpDown += new UpDownEventHandler(upDownButtons_UpDown); upDownAlign = LeftRightAlignment.Right; interceptArrowKeys = true; base.Size = ClientToBounds(new Size(upDownEdit.Width + DefaultButtonsWidth, upDownEdit.Height)); Controls.AddRange(new Control[] {upDownButtons, upDownEdit}); }
/// <include file='doc\UpDownBase.uex' path='docs/doc[@for="UpDownBase.UpDownBase"]/*' /> /// <devdoc> /// <para> /// Initializes a new instance of the <see cref='System.Windows.Forms.UpDownBase'/> /// class. /// </para> /// </devdoc> public UpDownBase() { upDownButtons = new UpDownButtons(this); upDownEdit = new UpDownEdit(this); upDownEdit.BorderStyle = BorderStyle.None; upDownEdit.AutoSize = false; upDownEdit.KeyDown += new KeyEventHandler(this.OnTextBoxKeyDown); upDownEdit.KeyPress += new KeyPressEventHandler(this.OnTextBoxKeyPress); upDownEdit.TextChanged += new EventHandler(this.OnTextBoxTextChanged); upDownEdit.LostFocus += new EventHandler(this.OnTextBoxLostFocus); upDownEdit.Resize += new EventHandler(this.OnTextBoxResize); upDownButtons.TabStop = false; upDownButtons.Size = new Size(DefaultButtonsWidth, PreferredHeight); upDownButtons.UpDown += new UpDownEventHandler(this.OnUpDown); Controls.AddRange(new Control[] { upDownButtons, upDownEdit} ); SetStyle(ControlStyles.Opaque | ControlStyles.FixedHeight | ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.StandardClick, false); SetStyle(ControlStyles.UseTextForAccessibility, false); }
public UpDownEditAccessibleObject(UpDownEdit owner, UpDownBase parent) : base(owner) { this.parent = parent; }
/// <include file='doc\UpDownBase.uex' path='docs/doc[@for="UpDownBase.UpDownBase"]/*' /> /// <devdoc> /// <para> /// Initializes a new instance of the <see cref='System.Windows.Forms.UpDownBase'/> /// class. /// </para> /// </devdoc> public UpDownBase() { if (!isScalingInitialized) { if (DpiHelper.IsScalingRequired) { defaultButtonsWidth = DpiHelper.LogicalToDeviceUnitsX(DefaultButtonsWidth); } isScalingInitialized = true; } upDownButtons = new UpDownButtons(this); upDownEdit = new UpDownEdit(this); upDownEdit.BorderStyle = BorderStyle.None; upDownEdit.AutoSize = false; upDownEdit.KeyDown += new KeyEventHandler(this.OnTextBoxKeyDown); upDownEdit.KeyPress += new KeyPressEventHandler(this.OnTextBoxKeyPress); upDownEdit.TextChanged += new EventHandler(this.OnTextBoxTextChanged); upDownEdit.LostFocus += new EventHandler(this.OnTextBoxLostFocus); upDownEdit.Resize += new EventHandler(this.OnTextBoxResize); upDownButtons.TabStop = false; upDownButtons.Size = new Size(defaultButtonsWidth, PreferredHeight); upDownButtons.UpDown += new UpDownEventHandler(this.OnUpDown); Controls.AddRange(new Control[] { upDownButtons, upDownEdit} ); SetStyle(ControlStyles.Opaque | ControlStyles.FixedHeight | ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.StandardClick, false); SetStyle(ControlStyles.UseTextForAccessibility, false); }
public UpDownEditAccessibleObject(UpDownEdit owner, UpDownBase parent) : base(owner) { _parent = parent.OrThrowIfNull(); }