C♯相談室 Part4
■ このスレッドは過去ログ倉庫に格納されています
0214名無しさん♯
NGNG漏れの環境ではうまくいってるよん。
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Design;
using System.Windows.Forms;
using System.Windows.Forms.Design;
class TestForm : Form
{
PropertyGrid grid;
public TestForm() {
grid = new PropertyGrid();
grid.Dock = DockStyle.Fill;
grid.SelectedObject = new Hoge();
this.Size = new Size(300, 400);
this.Controls.Add(grid);
}
[ STAThread ]
public static void Main() {
Application.Run( new TestForm() );
}
}
class Hoge
{
private string path = "";
[
Category("ターゲット"),
Description("ファイルの存在するディレクトリ"),
Editor( typeof(FolderNameEditor), typeof(UITypeEditor) )
]
public string Path {
get { return path; }
set { path = value; }
}
}
■ このスレッドは過去ログ倉庫に格納されています