Name
DomainUpDown
Synopsis
This Control
allows you to specify a list of
Items
from which you can select—similar to a
ListBox
or ComboBox
, except
only a single item is displayed at any one time, and there are
up-down spin buttons to enable selection from that list. You can
retrieve the SelectedIndex
or
SelectedItem
.
This control is extremely difficult to use, and you should always
consider using a ComboBox
instead, unless there is
really no room on your display for the drop list (e.g., you have a
320 × 100 LCD) .
public class DomainUpDown : UpDownBase { // Public Constructors public DomainUpDown(); // Public Instance Properties public DomainUpDownItemCollection Items{get; } public int SelectedIndex{set; get; } public object SelectedItem{set; get; } public bool Sorted{set; get; } public bool Wrap{set; get; } // Public Instance Methods public override void DownButton(); // overrides UpDownBase public override string ToString(); // overrides System.ComponentModel.Component public override void UpButton(); // overrides UpDownBase // Protected Instance Methods protected override AccessibleObject CreateAccessibilityInstance(); // overrides Control protected override void OnChanged(object source, EventArgs e); // overrides UpDownBase protected void OnSelectedItemChanged(object source, EventArgs e); protected override void OnTextBoxKeyDown(object source, KeyEventArgs e); // overrides UpDownBase protected override void UpdateEditText(); // overrides UpDownBase protected override void WndProc ...
Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.