标签: customproperty

属性网格:如何在网格右侧设置每个属性的显示名称标签?

我已经实现了一个自定义属性网格,我想知道我是否可以从左到右更改每个属性的标签位置.

我的自定义属性网格显示属性,如图所示.

在此输入图像描述

我想改变它是这样的:

在此输入图像描述

这是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)

.net c# propertygrid customproperty winforms

5
推荐指数
1
解决办法
664
查看次数

标签 统计

.net ×1

c# ×1

customproperty ×1

propertygrid ×1

winforms ×1