示例#1
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.autoCompleteTextBox1 = new AutoCompleteTextBox();
     this.SuspendLayout();
     //
     // autoCompleteTextBox1
     //
     this.autoCompleteTextBox1.BorderStyle             = System.Windows.Forms.BorderStyle.None;
     this.autoCompleteTextBox1.Dock                    = System.Windows.Forms.DockStyle.Fill;
     this.autoCompleteTextBox1.Location                = new System.Drawing.Point(4, 4);
     this.autoCompleteTextBox1.Name                    = "autoCompleteTextBox1";
     this.autoCompleteTextBox1.PopupBorderStyle        = System.Windows.Forms.BorderStyle.FixedSingle;
     this.autoCompleteTextBox1.PopupOffset             = new System.Drawing.Point(12, 4);
     this.autoCompleteTextBox1.PopupSelectionBackColor = System.Drawing.SystemColors.Highlight;
     this.autoCompleteTextBox1.PopupSelectionForeColor = System.Drawing.SystemColors.HighlightText;
     this.autoCompleteTextBox1.PopupWidth              = 120;
     this.autoCompleteTextBox1.Size                    = new System.Drawing.Size(120, 13);
     this.autoCompleteTextBox1.TabIndex                = 0;
     this.autoCompleteTextBox1.Text                    = "autoCompleteTextBox1";
     this.autoCompleteTextBox1.SizeChanged            += new System.EventHandler(this.TextBox_SizeChanged);
     //
     // CoolTextBox
     //
     this.BackColor = System.Drawing.SystemColors.Window;
     this.Controls.Add(this.autoCompleteTextBox1);
     this.DockPadding.All = 4;
     this.Name            = "CoolTextBox";
     this.Size            = new System.Drawing.Size(128, 22);
     this.ResumeLayout(false);
 }
示例#2
0
        private void TextBox_SizeChanged(object sender, System.EventArgs e)
        {
            AutoCompleteTextBox tb = sender as AutoCompleteTextBox;

            this.Height = tb.Height + 8;
        }
示例#3
0
 /// <summary>
 /// Initializes a new instance of <see cref="WinHook"/>
 /// </summary>
 /// <param name="tbox">The <see cref="AutoCompleteTextBox"/> the hook is running for.</param>
 public WinHook(AutoCompleteTextBox tbox)
 {
     this.tb = tbox;
 }