作者xanlich (...)
看板C_Sharp
标题[问题] PropertyGrid
时间Tue Jan 19 16:14:35 2010
PropertyGrid可以将Objects的属性条列式秀出来 and 轻易修改
网路上的教学文, 可以用StringConverter来做出comboBox
让使用者直接从ComboBox上选择值, 填入该属性
我想请问一下, 现在想让ComboBox里面的值, 是程式执行中动态产生
但这个StringConverter, 使用方式蛮特殊, 在class里如下:
public class A
{
public string B = "";
[Editor(typeof(StringConverter), ...] <===============
public string B
{
get { return B; }
set { B = value; }
}
}
我不知道他是什麽阶段建立的 @@, 不知道怎麽Assign动态值给它
而且我想把这个ComboBox换成DropDownList Type, 也找不到方法...
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 118.168.20.55
※ 编辑: xanlich 来自: 118.168.20.55 (01/19 16:17)