/// <summary>Create new combo box control</summary> public ComboBox(Dialog parent) : base(parent) { // Store control type and parent dialog controlType = ControlType.ComboBox; parentDialog = parent; // Create the scrollbar control too scrollbarControl = new ScrollBar(parent); // Set some default items dropHeight = 100; scrollWidth = 16; selectedIndex = -1; focusedIndex = -1; isScrollBarInit = false; // Create the item list array itemList = new ArrayList(); }
/// <summary>Create a new list box control</summary> public ListBox(Dialog parent) : base(parent) { // Store control type and parent dialog controlType = ControlType.ListBox; parentDialog = parent; // Create the scrollbar control too scrollbarControl = new ScrollBar(parent); // Set some default items style = ListBoxStyle.SingleSelection; scrollWidth = 16; selectedIndex = -1; selectedStarted = 0; isDragging = false; margin = 5; border = 6; textHeight = 0; isScrollBarInit = false; // Create the item list array itemList = new ArrayList(); }