3
我想在MyObject來的類定義進行C#通過這個集裝箱引用類的構造函數
this.Controls.Add(MyObject)
像
public MyClass(container/*?*/ con,Point L)
{
con.Controls.Add(this);
}
我可以做這樣的事情? 謝謝。
我想在MyObject來的類定義進行C#通過這個集裝箱引用類的構造函數
this.Controls.Add(MyObject)
像
public MyClass(container/*?*/ con,Point L)
{
con.Controls.Add(this);
}
我可以做這樣的事情? 謝謝。
Control
將工作得很好。
public void method(Control container)
{
container.Controls.Add(this);
}
如果您在Control
不能真正有孩子(比如,TextBox
)通過它要麼什麼都不做或在運行時拋出異常。
是的,就是這樣,謝謝! – void
這是爲winforms/wpf/silverlight/asp /以上都不是? – Servy
這是用於c#中的Windows窗體應用程序。我想用某些圖像創建「檢查點」(pictureboxes) – void
什麼是MyClass?來源於...? –