public FATabStrip() { BeginInit(); SetStyle(ControlStyles.ContainerControl, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.Selectable, true); items = new FATabStripItemCollection(); items.CollectionChanged += new CollectionChangeEventHandler(OnCollectionChanged); base.Size = new Size(350, 200); menu = new ContextMenuStrip(); menu.Renderer = ToolStripRenderer; menu.ItemClicked += new ToolStripItemClickedEventHandler(OnMenuItemClicked); menu.VisibleChanged += new EventHandler(OnMenuVisibleChanged); menuGlyph = new FATabStripMenuGlyph(ToolStripRenderer); closeButton = new FATabStripCloseButton(ToolStripRenderer); Font = defaultFont; sf = new StringFormat(); EndInit(); UpdateLayout(); }
public FATabStrip() { BeginInit(); SetStyle(ControlStyles.ContainerControl, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.Selectable, true); items = new FATabStripItemCollection(); items.CollectionChanged += new CollectionChangeEventHandler(OnCollectionChanged); base.Size = new Size(350, 200); menu = new ContextMenuStrip(); menu.RenderMode = ToolStripRenderMode.ManagerRenderMode; menu.ItemClicked += new ToolStripItemClickedEventHandler(OnMenuItemClicked); menu.VisibleChanged += new EventHandler(OnMenuVisibleChanged); menuGlyph = new FATabStripMenuGlyph(ToolStripRenderer); closeButton = new FATabStripCloseButton(ToolStripRenderer); Font = defaultFont; sf = new StringFormat(); EndInit(); UpdateLayout(); }
public FATabStrip() { BeginInit(); double dpiscale = 1.0; using (Graphics g = this.CreateGraphics()) { dpiscale = g.DpiX / 96.0; } DEF_HEADER_HEIGHT = (int)(19 * dpiscale); SetStyle(ControlStyles.ContainerControl, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); SetStyle(ControlStyles.Selectable, true); items = new FATabStripItemCollection(); items.CollectionChanged += new CollectionChangeEventHandler(OnCollectionChanged); base.Size = new Size(350, 200); menu = new ContextMenuStrip(); menu.RenderMode = ToolStripRenderMode.ManagerRenderMode; menu.ItemClicked += new ToolStripItemClickedEventHandler(OnMenuItemClicked); menu.VisibleChanged += new EventHandler(OnMenuVisibleChanged); menuGlyph = new FATabStripMenuGlyph(ToolStripRenderer); closeButton = new FATabStripCloseButton(ToolStripRenderer); Font = defaultFont; sf = new StringFormat(); EndInit(); UpdateLayout(); }