Beispiel #1
0
        public IntelliTextBox()
        {
            triggerColors = new System.Collections.Generic.Dictionary <char, Color>();

            this.TextChanged += new EventHandler(IntelliTextBox_TextChanged);
            this.KeyPress    += new KeyPressEventHandler(IntelliTextBox_KeyPress);
            this.MouseDown   += new MouseEventHandler(IntelliTextBox_MouseDown);
            this.Leave       += new EventHandler(IntelliTextBox_Leave);

            listBox               = new ListBoxEx();
            listBox.ItemMargin    = 2;
            listBox.Width         = 200;
            listBox.AntiAliasText = false;
            listBox.BorderStyle   = BorderStyle.FixedSingle;
            listBox.Click        += new EventHandler(listBox_Click);
            listBox.Visible       = false;

            popupWindow             = new Controls.Popup.Popup(listBox);
            popupWindow.AutoClose   = false;
            popupWindow.AcceptAlt   = false;
            popupWindow.FocusOnOpen = false;
            popupWindow.Visible     = false;
            popupWindow.Close();
        }
Beispiel #2
0
        public IntelliTextBox()
        {
            triggerColors = new System.Collections.Generic.Dictionary<char, Color>();

            this.TextChanged += new EventHandler(IntelliTextBox_TextChanged);
            this.KeyPress += new KeyPressEventHandler(IntelliTextBox_KeyPress);
            this.MouseDown += new MouseEventHandler(IntelliTextBox_MouseDown);
            this.Leave += new EventHandler(IntelliTextBox_Leave);

            listBox = new ListBoxEx();
            listBox.ItemMargin = 2;
            listBox.Width = 200;
            listBox.AntiAliasText = false;
            listBox.BorderStyle = BorderStyle.FixedSingle;
            listBox.Click += new EventHandler(listBox_Click);
            listBox.Visible = false;

            popupWindow = new Controls.Popup.Popup(listBox);
            popupWindow.AutoClose = false;
            popupWindow.AcceptAlt = false;
            popupWindow.FocusOnOpen = false;
            popupWindow.Visible = false;
            popupWindow.Close();
        }
Beispiel #3
0
 private void SetOwnerItem(Control control)
 {
     if (control == null)
     {
         return;
     }
     if (control is Popup)
     {
         Popup popupControl = control as Popup;
         ownerPopup = popupControl;
         ownerPopup.childPopup = this;
         OwnerItem = popupControl.Items[0];
         return;
     }
     if (control.Parent != null)
     {
         SetOwnerItem(control.Parent);
     }
 }