显示集合在PropertyGrid控件 [英] Displaying a Collection in a PropertyGrid Control

查看:1279
本文介绍了显示集合在PropertyGrid控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含对字符串的标签和值的对象数组,我将如何把他们都在一个单一的属性网格?



 公共类stringVariable {
公共字符串名称;
公共字符串设置defaultValue;
公共字符串值;
};
公开名单< stringVariable>变量=新的List< stringVariable>();


解决方案

添加对象的数组属性网格是相当还有覆盖在一些教程。 应该是你在找什么。


I have an array of objects containing pairs of string labels and values, how would I put them all in a single property grid?

    public class stringVariable {
        public String name;
        public String defaultValue;
        public String value;
    };
    public List<stringVariable> variables = new List<stringVariable>();

解决方案

Adding an array of objects to a property grid is pretty well covered in a number of tutorials. This should be what you're looking for.

这篇关于显示集合在PropertyGrid控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆