Hi
You should use character'\t'. Try something like :
Code Snippet
PropertyGridP
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
MySize my = new MySize();
this.propertyGrid1.SelectedObject = my;
}
public class MySize
{
int width;
[DefaultValue(0), Category("A")]
public int Width
{
get { return width; }
set { width = value; }
}
int height;
[DefaultValue(0), Category("\t\t\t\t\t\t\tB")]
public int Height
{
get { return height; }
set { height = value; }
}
Size si;
[Category("\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tC")]
public Size Si
{
get { return si; }
set { si = value; }
}
}
Hi
You should use character'\t'. Try something like :
Code Snippet
PropertyGridP
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
MySize my = new MySize();
this.propertyGrid1.SelectedObject = my;
}
public class MySize
{
int width;
[DefaultValue(0), Category("A")]
public int Width
{
get { return width; }
set { width = value; }
}
int height;
[DefaultValue(0), Category("\t\t\t\t\t\t\tB")]
public int Height
{
get { return height; }
set { height = value; }
}
Size si;
[Category("\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tC")]
public Size Si
{
get { return si; }
set { si = value; }
}
}
mhh, unfortunately if i use this method i get a small black bar infront of the category name. is there a better solution?
My categories contain numbers so i need to order them numeric. That means, 103 comes after 73...
Nico |