Inheritance: System.Windows.Forms.UserControl
Beispiel #1
0
 public AutocompleteMenu(FastColoredTextBox tb)
 {
     // create a new popup and add the list view to it
     Visible     = false;
     BorderStyle = BorderStyle.FixedSingle;
     AutoSize    = false;
     Margin      = Padding.Empty;
     Padding     = Padding.Empty;
     BackColor   = Color.White;
     listView    = new AutocompleteListView(tb);
     CalcSize();
     this.Controls.Add(listView);
     SearchPattern     = @"[\w\.]";
     MinFragmentLength = 2;
 }
 public AutocompleteMenu(FastColoredTextBox tb)
 {
     // create a new popup and add the list view to it 
     AutoClose = false;
     AutoSize = false;
     Margin = Padding.Empty;
     Padding = Padding.Empty;
     listView = new AutocompleteListView(tb);
     host = new ToolStripControlHost(listView);
     host.Margin = new Padding(2, 2, 2, 2);
     host.Padding = Padding.Empty;
     host.AutoSize = false;
     host.AutoToolTip = false;
     CalcSize();
     base.Items.Add(host);
     SearchPattern = @"[\w\.]";
     MinFragmentLength = 2;
 }
Beispiel #3
0
 public AutocompleteMenu(FastColoredTextBox tb)
 {
     // create a new popup and add the list view to it
     AutoClose        = false;
     AutoSize         = false;
     Margin           = Padding.Empty;
     Padding          = Padding.Empty;
     listView         = new AutocompleteListView(tb);
     host             = new ToolStripControlHost(listView);
     host.Margin      = new Padding(2, 2, 2, 2);
     host.Padding     = Padding.Empty;
     host.AutoSize    = false;
     host.AutoToolTip = false;
     CalcSize();
     base.Items.Add(host);
     SearchPattern     = @"[\w\.]";
     MinFragmentLength = 2;
 }
 //const int WS_BORDER  = 0x800000;
 //const int WS_SIZEBOX = 0x040000;
 //protected override CreateParams CreateParams {
 //    [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
 //    get { var cp = base.CreateParams; cp.Style |= WS_BORDER; return cp; }
 //}
 public AutocompleteMenu(FastColoredTextBox tb)
 {
     // create a new popup and add the list view to it
     AutoClose = false;
     AutoSize  = false;
     Margin    = Padding.Empty;
     Padding   = Padding.Empty;
     BackColor = Color.White;
     listView  = new AutocompleteListView(tb);
     host      = new ToolStripControlHost(listView) {
         Margin      = new Padding(2, 2, 2, 2),
         Padding     = Padding.Empty,
         AutoSize    = false,
         AutoToolTip = false
     };
     CalcSize();
     base.Items.Add(host);
     listView.Parent   = this;
     SearchPattern     = @"[\{\#\w\.]";
     MinFragmentLength = 2;
     InitSize = new Size(240, listView.ItemHeight * 15);
     ResizeRedraw = false;
     //listView.VerticalScrollBar.ThumbHoverColor = Color.FromArgb(255, Color.SkyBlue);
 }
 // < By WendyH -----------------------------------
 protected override void Dispose(bool disposing)
 {
     if (disposing) {
         if (listView != null && !listView.IsDisposed)
             listView.Dispose();
         if (host != null && !host.IsDisposed)
             host.Dispose();
     }
     listView = null;
     host = null;
     Fragment = null;
     base.Dispose(disposing);
 }
 public AutocompleteMenu(FastColoredTextBox tb)
 {
     // create a new popup and add the list view to it
     Visible = false;
     BorderStyle = BorderStyle.FixedSingle;
     AutoSize = false;
     Margin = Padding.Empty;
     Padding = Padding.Empty;
     BackColor = Color.White;
     listView = new AutocompleteListView(tb);
     CalcSize();
     this.Controls.Add(listView);
     SearchPattern = @"[\w\.]";
     MinFragmentLength = 2;
 }