public static ToolStripLabel AddLabel(this ToolStripPanelItem parent, string text, int marginLeft, int marginTop, int marginRight, int marginBottom) { var item = AddLabel(parent, text); item.Margin = new Padding(marginLeft, marginTop, marginRight, marginBottom); return(item); }
public static ToolStripPanelItem AddPanel(this ToolStripPanelItem parent) { var item = new ToolStripPanelItem(); parent.Items.Add(item); return(item); }
public static ToolStripLabel AddLabel(this ToolStripPanelItem parent, string text, int margin) { var item = AddLabel(parent, text); item.Margin = new Padding(margin); return(item); }
public static ToolStripRadioButton AddRadioButton(this ToolStripPanelItem parent, string text) { var item = new ToolStripRadioButton(); item.Text = text; parent.Items.Add(item); return(item); }
public static ToolStripCheckBox AddCheckBox(this ToolStripPanelItem parent, string text) { var item = new ToolStripCheckBox(); item.Text = text; parent.Items.Add(item); return(item); }
public static ToolStripLabel AddLabel(this ToolStripPanelItem parent, string text) { var item = new ToolStripLabel(); item.Text = text; parent.Items.Add(item); return(item); }
public static ToolStripButton AddButton(this ToolStripPanelItem parent, string text) { var item = new ToolStripButton(); Appearances.MainRibbonButton(item, text); parent.Items.Add(item); return(item); }
public static ToolStripComboBoxEx AddComboBox(this ToolStripPanelItem parent) { var item = new ToolStripComboBoxEx(); item.Style = ToolStripExStyle.Office2016Colorful; parent.Items.Add(item); return(item); }
public static ToolStripPanelItem AddPanel(this ToolStripPanelItem parent, int count = 3) { var item = new ToolStripPanelItem(); item.RowCount = count; item.AutoSize = true; parent.Items.Add(item); return(item); }
private void InitializeApplicationMenuItems() { ToolStripDropDown dropDownMenu = new ToolStripDropDown(); ToolStripButton newMenu = new ToolStripButton("&New"); ToolStripButton openMenu = new ToolStripButton("&Open"); ToolStripButton saveMenu = new ToolStripButton("&Save"); ToolStripButton closeMenu = new ToolStripButton("&Close"); ToolStripPanelItem dropDownPanel = new ToolStripPanelItem(); Icon appIcon = new Icon(@"..\..\App.ico"); newMenu.Image = new System.Drawing.Bitmap(@"../../Icons/New32.png"); openMenu.Image = new System.Drawing.Bitmap(@"../../Icons/Open32.png"); saveMenu.Image = new System.Drawing.Bitmap(@"../../Icons/Save32.png"); closeMenu.Image = new System.Drawing.Bitmap(@"../../Icons/Close32.png"); dropDownPanel.Items.Add(newMenu); dropDownPanel.Items.Add(openMenu); dropDownPanel.Items.Add(saveMenu); dropDownPanel.Items.Add(closeMenu); dropDownPanel.RowCount = 4; newMenu.Click += NewReport; openMenu.Click += OpenReport; saveMenu.Click += SaveReport; closeMenu.Click += CloseReportDesigner; foreach (ToolStripButton button in dropDownPanel.Items) { button.AutoSize = false; button.Size = new System.Drawing.Size(170, 35); button.ImageAlign = ContentAlignment.MiddleLeft; button.TextAlign = ContentAlignment.MiddleLeft; button.ImageScaling = ToolStripItemImageScaling.None; } dropDownMenu.Items.Add(dropDownPanel); this.reportRibbon.MenuButtonDropDown = dropDownMenu; this.Appearance = AppearanceType.Office2007; this.ColorScheme = ColorSchemeType.Blue; reportDesignerContainer.Child = reportDesigner; reportViewerContainer.Child = reportViewer; reportViewerContainer.Hide(); //Assign the Element host child items. this.Controls.Add(reportViewerContainer); this.Controls.Add(reportDesignerContainer); this.Icon = appIcon; InsertTab.Checked = true; }
public static ToolStripButton AddButton(this ToolStripPanelItem parent, string text) { return(AddButton(parent, text)); }