L
Lee Gent
Hey all,
Is there some bug with WinForms? Since installing the Service Pack for
fx1.1, putting a groupbox inside another, when both have their FlatStyle set
to System the nested groupbox has its label/title text 'bloated' and
truncated (removing the common control manifest fixed it, but... Then it
doesn't look as good .
Thanks,
L
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace WindowsApplication1
{
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.GroupBox groupBox13;
private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.groupBox13 = new System.Windows.Forms.GroupBox();
this.groupBox5.SuspendLayout();
this.groupBox6.SuspendLayout();
this.SuspendLayout();
//
// groupBox5
//
this.groupBox5.Controls.Add(this.groupBox6);
this.groupBox5.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.groupBox5.Location = new System.Drawing.Point(8, 8);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(248, 128);
this.groupBox5.TabIndex = 1;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "groupBox1";
//
// groupBox6
//
this.groupBox6.Controls.Add(this.groupBox13);
this.groupBox6.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.groupBox6.Location = new System.Drawing.Point(16, 24);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(184, 88);
this.groupBox6.TabIndex = 0;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "groupBox1";
//
// groupBox13
//
this.groupBox13.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.groupBox13.Location = new System.Drawing.Point(8, 24);
this.groupBox13.Name = "groupBox13";
this.groupBox13.Size = new System.Drawing.Size(144, 40);
this.groupBox13.TabIndex = 0;
this.groupBox13.TabStop = false;
this.groupBox13.Text = "groupBox1";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(272, 158);
this.Controls.Add(this.groupBox5);
this.Name = "Form1";
this.Text = "Form1";
this.groupBox5.ResumeLayout(false);
this.groupBox6.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
}<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="CompanyName.ProductName.YourApplication"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
Is there some bug with WinForms? Since installing the Service Pack for
fx1.1, putting a groupbox inside another, when both have their FlatStyle set
to System the nested groupbox has its label/title text 'bloated' and
truncated (removing the common control manifest fixed it, but... Then it
doesn't look as good .
Thanks,
L
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace WindowsApplication1
{
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.GroupBox groupBox13;
private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.groupBox13 = new System.Windows.Forms.GroupBox();
this.groupBox5.SuspendLayout();
this.groupBox6.SuspendLayout();
this.SuspendLayout();
//
// groupBox5
//
this.groupBox5.Controls.Add(this.groupBox6);
this.groupBox5.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.groupBox5.Location = new System.Drawing.Point(8, 8);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(248, 128);
this.groupBox5.TabIndex = 1;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "groupBox1";
//
// groupBox6
//
this.groupBox6.Controls.Add(this.groupBox13);
this.groupBox6.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.groupBox6.Location = new System.Drawing.Point(16, 24);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(184, 88);
this.groupBox6.TabIndex = 0;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "groupBox1";
//
// groupBox13
//
this.groupBox13.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.groupBox13.Location = new System.Drawing.Point(8, 24);
this.groupBox13.Name = "groupBox13";
this.groupBox13.Size = new System.Drawing.Size(144, 40);
this.groupBox13.TabIndex = 0;
this.groupBox13.TabStop = false;
this.groupBox13.Text = "groupBox1";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(272, 158);
this.Controls.Add(this.groupBox5);
this.Name = "Form1";
this.Text = "Form1";
this.groupBox5.ResumeLayout(false);
this.groupBox6.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
}
}<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="CompanyName.ProductName.YourApplication"
type="win32"
/>
<description>Your application description here.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>