Пример #1
0
        public CompletionSet(TextBox editor)
        {
            this.SetStyle(ControlStyles.Selectable, true);
            this._listBox                       = new ListBox();
            this._listBox.Name                  = "CompletionList";
            this._listBox.AccessibleName        = "CompletionList";
            this._listBox.BorderStyle           = BorderStyle.Fixed3D;
            this._listBox.KeyDown              += new KeyEventHandler(listBox_KeyDown);
            this._listBox.DoubleClick          += new EventHandler(listBox_DoubleClick);
            this._listBox.AutoSize              = true;
            this._listBox.SelectedIndexChanged += new EventHandler(listBox_SelectedIndexChanged);

            this._editor              = editor;
            this._editor.TextChanged += new EventHandler(editor_TextChanged);
            this._editor.KeyDown     += new KeyEventHandler(editor_KeyDown);

            this._button                = new Button();
            this._button.Name           = "BuilderButton";
            this._button.AccessibleName = "BuilderButton";
            this._button.Visible        = false;
            this._button.Click         += new EventHandler(button_Click);
            this._button.AutoSize       = true;
            this._button.KeyDown       += new KeyEventHandler(editor_KeyDown);

            this.Visible = false;
            this._tip    = new IntelliTip(editor);
            this._tip.AddWatch(this._listBox);
            this._tip.ShowToolTip += new IntelliTipEventHandler(OnShowToolTip);

            this.Controls.Add(this._listBox);
            this.Controls.Add(this._button);

            this.AccessibleName = "CompletionSet";
        }
Пример #2
0
        public CompletionSet(TextBox editor)
        {
            this.SetStyle(ControlStyles.Selectable, true);
            this.listBox = new ListBox();
            this.listBox.Name = "CompletionList";
            this.listBox.AccessibleName = "CompletionList";
            this.listBox.BorderStyle = BorderStyle.Fixed3D;
            this.listBox.KeyDown += new KeyEventHandler(listBox_KeyDown);
            this.listBox.DoubleClick += new EventHandler(listBox_DoubleClick);
            this.listBox.AutoSize = true;
            this.listBox.SelectedIndexChanged += new EventHandler(listBox_SelectedIndexChanged);

            this.editor = editor;
            this.editor.TextChanged += new EventHandler(editor_TextChanged);
            this.editor.KeyDown += new KeyEventHandler(editor_KeyDown);

            this.button = new Button();
            this.button.Name = "BuilderButton";
            this.button.AccessibleName = "BuilderButton";
            this.button.Visible = false;
            this.button.Click += new EventHandler(button_Click);
            this.button.AutoSize = true;
            this.button.KeyDown += new KeyEventHandler(editor_KeyDown);

            this.Visible = false;
            this.tip = new IntelliTip(editor);
            this.tip.AddWatch(this.listBox);
            this.tip.ShowToolTip += new IntelliTipEventHandler(OnShowToolTip);

            this.Controls.Add(this.listBox);
            this.Controls.Add(this.button);

            this.AccessibleName = "CompletionSet";
        }