Ragazzi ho questo problema:
class SharpApp : Window
{ public SharpApp() : base("Enter")
{
SetDefaultSize(200,200);
Table MyTab = new Table(1,2,true);
Button MyButt1 = new Button("Button1");
MyButt1.Clicked += OnClicked;
Button MyButt2 = new Button("Button2");
MyButt2.Sensitive = false;
MyButt2.Clicked += OnClicked;
MyTab.Attach(MyButt1,0,1,0,1);
MyTab.Attach(MyButt2,1,2,0,1);
Add(MyTab);
ShowAll();
}
public void OnClicked(object Sender, EventArgs Args)
{ if(Sender==MyButt1)
{ MyButt2.Sensitive = true;
}
}
public static void Main()
{ Application.Init();
new SharpApp();
Application.Run();
}
}
quando vado a compilare mi dice che nel gestore dell'evento sia MyButt1 che MyButt2 " does not exist in the current context".....ma allora come posso fare per manipolare gli oggetti presenti nella mia finestra?
Aspetto vostri consigli....