I use MonoDevelop 2.4.2.1 on WinXP. I have a window with VBox and button 'MyButton'. Now I should write a method for 'MyButton' for creating other Button's instances dinamically开发者_C百科. I can't understand how to handle containers and widgets. Please give me advice how to do this.
Thanx!
You'll need to do something like:
myButton.Clicked += delegate {
var nextButton = new Button ("Hello");
box.PackEnd (nextButton, false, false, 0);
};
You can find GTK# tutorials at http://www.mono-project.com/GtkSharpTutorials and at http://zetcode.com/tutorials/gtksharptutorial/
In particular, I would suggest you read http://www.mono-project.com/GtkSharp:_Widget_Layout_and_Packing
精彩评论