开发者

Windows forms: PropertyGrid

开发者 https://www.devze.com 2023-01-13 19:00 出处:网络
Does setting PropertyGrid.SelectedObject = null; effects the actual object? eg: Button b = new Button();

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

精彩评论

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