[MonoDevelop] Can't get basic code to work
Sergio Hernandez
info.geex at gmail.com
Wed Jul 25 19:47:50 EDT 2007
Looks like the compiler is not aware of the Clicked Signal and/or the Label &
Entry widgets. Try the following:
1.- On Stetic you need to initialize the Clicked signal for the button1. On
the Stetic designer, select the button on the <Widget Properties> go to the
tab <Signals> (There are only two tabs, <Properties> & <Signals>). Expand
<Button Signals> and then select <Clicked>, then double click to initialize
the Signal, and again double click to create the template:
protected virtual void OnButton1Clicked(object sender, System.EventArgs e){ }
On MainWindow.cs in the view Source Code (MainWindow.cs have two view <Source
Code> & <Designer>). Here you can start coding.
2.- Probably you are not declaring the label1 & entry1 widgets. So you need to
declare them as Gtk widgets right after the declaration of the public class
and before the constructor:
public class MainWindow: Gtk.Window
{
Label label1; // or Gtk.Label
Entry entry1; // or Gtk.Entry
public MainWindow (): base ("")
{
On Wednesday 25 July 2007 17:27:27 Sergio Hernandez wrote:
> Looks like the compiler is not aware of the Clicked Signal and/or the Label
> & Entry widgets. Try the following:
>
> 1.- On Stetic you need to initialize the Clicked signal for the button1. On
> the Stetic designer, select the button on the <Widget Properties> go to the
> tab <Signals> (There are only two tabs, <Properties> & <Signals>). Expand
> <Button Signals> and then select <Clicked>, then double click to initialize
> the Signal, and again double click to create the template:
>
> protected virtual void OnButton1Clicked(object sender, System.EventArgs e){
> }
>
> On MainWindow.cs in the view Source Code (MainWindow.cs have two view
> <Source Code> & <Designer>). Here you can start coding.
>
> 2.- Probably you are not declaring the label1 & entry1 widgets. So you need
> to declare them as Gtk widgets right after the declaration of the public
> class and before the constructor:
>
> public class MainWindow: Gtk.Window
> {
> Label label1; // or Gtk.Label
> Entry entry1; // or Gtk.Entry
> public MainWindow (): base ("")
> {
More information about the Monodevelop-list
mailing list