[Gtk-sharp-list] Newby Stock.Type question

Chris du Preez chris@flamengro.co.za
Tue, 15 Jun 2004 13:33:30 +0200


Hi my name is Chris

I would appreciate it if someone can explain to me what I=B4m doing wrong.
The two buttons is suppose to look exactly the same, but it doesn=B4t
_____________________________________________________
Main.cs

using System;
using Gtk;

class MainClass {
	public static void Main(string[] args)
	{
		Application.Init ();
		new MyWindow ();
		Application.Run ();
	}
}
using System;
using Gtk;
______________________________________________________

MyWindow.cs

public class MyWindow : Window {

	VBox vbox1 =3D new VBox(false, 5);
	Button btn1 =3D new Button (Gtk.Stock.Open);
	PicButton btn2 =3D new PicButton(Gtk.Stock.Open);

=09
	public MyWindow () : base ("MyWindow")
	{
	=09
		vbox1.PackStart(btn1, false, false, 3);
		vbox1.PackStart(btn2, false, false, 3);
		this.DeleteEvent +=3D new DeleteEventHandler (OnMyWindowDelete);
		this.BorderWidth =3D 10;
		this.Add(vbox1);
		this.ShowAll ();
	}
=09
	void OnMyWindowDelete (object o, DeleteEventArgs args)
	{
		Application.Quit ();
	}
}

______________________________________________________________

PicButton.cs

using Gtk;
using System;

public class PicButton : Button {

    public PicButton(string what) : base(what){

		Button pButton =3D new Button(what);
	}
}