[Mono-winforms-list] Back again
Philip Van Hoof
spamfrommailing@freax.org
Mon, 06 Oct 2003 23:46:35 +0200
On Wed, 2003-10-01 at 06:20, Joel Basson wrote:
> Back from doing my varsity work, so I should be doing some swf-gtk stuff
> soon.
Nice. welcome back :). The SWF/Gtk stuff sure can use some love :). And
if more than one person is working on it I will automatically get
motivated to finish some controls too :). Btw, I haven't got very much
time myself. New job .. some Compact Framework projects which took a lot
of my free time, etc etc :)
> 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
Okay.. I'll check how I can fix that
> 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.
Okay, when I have some time for that I will check it out. Probably this
weekend.
ps. After trying some stuff, I fear that we will have to fix Gtk-Sharp
in some places to get stuff done in a clean way. Else we will have to
P/Invoke to the gtk-libs ourselve sometimes.
> Cheers
>
> Joel
>
>
> Here is a small program that remove the label from a button so you can
> see what it should do
Okay .. if now simply adding a hbox to the container works, the button
control will be pretty much like the control on native windows :).
> 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;
> }
>
> }
>
> _______________________________________________
> Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
--
Philip Van Hoof, Software Developer @ Cronos
home: me at freax dot org
work: Philip dot VanHoof at cronos dot be
http://www.freax.be, http://www.freax.eu.org