本文整理汇总了C#中System.Windows.Forms.ToolBar.SuspendLayout方法的典型用法代码示例。如果您正苦于以下问题:C# ToolBar.SuspendLayout方法的具体用法?C# ToolBar.SuspendLayout怎么用?C# ToolBar.SuspendLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.ToolBar
的用法示例。
在下文中一共展示了ToolBar.SuspendLayout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitToolbar
private void InitToolbar()
{
bool bResumeLayout=false;
// Clear out anything from before
if (mainTB != null)
{
this.SuspendLayout();
mainTB.SuspendLayout();
bResumeLayout=true;
mainTB.Controls.Clear();
if (ctlBold!=null) {ctlBold=null;}
if (ctlItalic!=null) {ctlItalic=null;}
if (ctlUnderline!=null) {ctlUnderline=null;}
if (ctlFont!=null) {ctlFont=null;}
if (ctlFontSize!=null) {ctlFontSize=null;}
if (ctlForeColor!=null) {ctlForeColor=null;}
if (ctlBackColor!=null) {ctlBackColor=null;}
if (ctlNew!=null) {ctlNew=null;}
if (ctlOpen!=null) {ctlOpen=null;}
if (ctlSave!=null) {ctlSave=null;}
if (ctlCut!=null) {ctlCut=null;}
if (ctlCopy!=null) {ctlCopy=null;}
if (ctlUndo!=null) {ctlUndo=null;}
if (ctlPaste!=null) {ctlPaste=null;}
if (ctlPrint!=null) {ctlPrint=null;}
if (ctlPdf!=null) {ctlPdf=null;}
if (ctlXml!=null) {ctlXml=null;}
if (ctlHtml!=null) {ctlHtml=null;}
if (ctlMht!=null) {ctlMht=null;}
if (ctlZoom!=null) {ctlZoom=null;}
if (ctlInsertCurrent!=null) {ctlInsertCurrent=null;}
if (ctlInsertTextbox!=null) {ctlInsertTextbox=null;}
if (ctlInsertChart!=null) {ctlInsertChart=null;}
if (ctlInsertRectangle!=null) {ctlInsertRectangle=null;}
if (ctlInsertTable!=null) {ctlInsertTable=null;}
if (ctlInsertMatrix!=null) {ctlInsertMatrix=null;}
if (ctlInsertList!=null) {ctlInsertList=null;}
if (ctlInsertLine!=null) {ctlInsertLine=null;}
if (ctlInsertImage!=null) {ctlInsertImage=null;}
if (ctlInsertSubreport!=null) {ctlInsertSubreport=null;}
if (ctlEditTextbox!=null){ctlEditTextbox=null;}
if (ctlEditLabel!=null){ctlEditLabel=null;}
}
else
{
mainTB = new ToolBar();
mainTB.SizeChanged += new EventHandler(mainTB_SizeChanged);
mainTB.SuspendLayout();
}
const int LINEHEIGHT = 22;
const int LEFTMARGIN = 5;
int y = 2;
int x = LEFTMARGIN;
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(RdlDesigner));
// Build the controls the user wants
foreach (string tbi in _Toolbar)
{
switch (tbi)
{
case "\n":
case "Newline":
y += LINEHEIGHT;
x = LEFTMARGIN;
break;
case "Bold":
x += InitToolbarBold(x,y);
break;
case "Italic":
x += InitToolbarItalic(x,y);
break;
case "Underline":
x += InitToolbarUnderline(x,y);
break;
case "Space":
x += 5;
break;
case "Font":
x += InitToolbarFont(x,y);
break;
case "FontSize":
x += InitToolbarFontSize(x,y);
break;
case "ForeColor":
ctlForeColor = InitToolbarColor(ref x, y, "Fore Color");
ctlForeColor.SelectedValueChanged +=new EventHandler(ctlForeColor_Change);
ctlForeColor.Validated +=new EventHandler(ctlForeColor_Change);
break;
case "BackColor":
ctlBackColor = InitToolbarColor(ref x, y, "Back Color");
ctlBackColor.SelectedValueChanged +=new EventHandler(ctlBackColor_Change);
ctlBackColor.Validated +=new EventHandler(ctlBackColor_Change);
break;
case "New":
ctlNew = InitToolbarMenu(ref x, y, "New", bNew.Image, new EventHandler(this.menuFileNewReport_Click));
break;
case "Open":
ctlOpen = InitToolbarMenu(ref x, y, "Open", bOpen.Image, new EventHandler(this.menuFileOpen_Click));
break;
//.........这里部分代码省略.........