我已经实现了一个自定义属性网格,我想知道我是否可以从左到右更改每个属性的标签位置.
我的自定义属性网格显示属性,如图所示.
我想改变它是这样的:
这是Custom Property网格的主要代码
public class CustomPropertyGrid : PropertyGrid
{
private System.ComponentModel.Container components = null;
private ReperesentAttr representAttr;
private myTab tab;
public CustomPropertyGrid()
{
this.representAttr = new ReperesentAttr("", "");
tab.SetRepresentAttr = this.representAttr;
InitializeComponent();
this.PropertySort = PropertySort.Alphabetical;
this.RightToLeft = RightToLeft.Yes;
// this.
}
public ReperesentAttr SetRepresentAttr
{
set
{
representAttr = value;
tab.SetRepresentAttr = this.representAttr;
}
}
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
#region Codice generato da …
Run Code Online (Sandbox Code Playgroud)