[Mono-winforms-list] Back again
Joel Basson
jstrike@mweb.co.za
Wed, 01 Oct 2003 06:20:40 +0200
Hi everyone
Back from doing my varsity work, so I should be doing some swf-gtk stuff
soon.
Phillip, saw your comments in Control.cs
I added in some code to remove the label from a button, but I cant check
to see if it works.
if (this.owner.GetType() == typeof (System.Windows.Forms.Button))
never gets called as it always returns a Control, never a Button, so the
code will never get called
We are also going to have to add in a container for the GroupBox.
You seem to understand the positioning stuff a lot better than me, so if
you could do that when you have a chance that would be great.
Cheers
Joel
Here is a small program that remove the label from a button so you can
see what it should do
namespace GtkSamples {
using Gtk;
using Gdk;
using GtkSharp;
using System;
public class HelloWorld {
public static int Main (string[] args)
{
Application.Init ();
Gtk.Window win = new Gtk.Window ("Gtk# Hello World");
win.DeleteEvent += new DeleteEventHandler (Window_Delete);
Gtk.Button mybut = new Gtk.Button("Test");
GLib.List mylist = new GLib.List((IntPtr) 0, typeof (Gtk.Widget));
mylist = mybutton.Children;
foreach (Gtk.Widget awidget in mylist){mybut.Remove(awidget);}
win.Add(mybut);
win.ShowAll ();
Application.Run ();
return 0;
}
static void Window_Delete (object obj, DeleteEventArgs args)
{
SignalArgs sa = (SignalArgs) args;
Application.Quit ();
sa.RetVal = true;
}
}