开发者

Windows forms: PropertyGrid

Does setting PropertyGrid.SelectedObject = null; effects the actual object? eg:

Button b = new Button();
System.Windows.Forms.PropertyGrid pg = new System.Windows.Forms.PropertyGrid();
pg.SelectedObject = b;

pg.SelectedObject = null;

What will happen t开发者_如何学Goo Button b? will it be null?

Thanks & regards, Vishal.


Setting PropertyGrid.SelectedObject only affects the PropertyGrid. If you set SelectedObject to null, it means that there is simply no object displayed in the property grid. In your example, button b will not be affected.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜