[Gtk-sharp-list] combo widget

Borja Sanchez Zamorano borsanza@terra.es
Fri, 12 Mar 2004 18:09:32 +0100


In the implementation of gtk-sharp only exist PopdownStrings for
string[], but in the monodoc exist two. I don't understand it. Sorry.

In gtk-sharp-0.16 exist only Combo.PopdownStrings for GLib.List
In gtk-sharp-0.17 exist only Combo.PopdownStrings for string[]

BorSanZa

El vie, 12-03-2004 a las 16:03, Roberto D=EDaz escribi=F3:
> Hello,
>=20
> I'm using Mono 0.30 and gtk-sharp 0.17 and I'm trying to compile this
> code:
>=20
> using System;
> using System.Runtime.InteropServices;
> using Gtk;
> using GLib;
>=20
> class ComboSample{
>         Combo combo;
>         OptionMenu opt;
>         static void Main ()
>         {
>                 new ComboSample ();
>         }
>         ComboSample ()
>         {
>                 Application.Init ();
>                 Window win =3D new Window ("ComboSample");
>                 win.DeleteEvent +=3D new DeleteEventHandler (OnWinDelete)=
;
>=20
>                 GLib.List l =3D new GLib.List (IntPtr.Zero,
> typeof(string));
>                 l.Append("hello");
>=20
>                 combo =3D new Combo ();
>                 combo.PopdownStrings =3D l;
>                 combo.DisableActivate ();
>                 combo.Entry.Activated +=3D new EventHandler
> (OnEntryActivated);
>                                                                          =
                          =20
>                 win.Add (combo);
>                 win.ShowAll ();
>                 Application.Run ();
>         }
> }
>=20
> I get on the line "combo.PopdownStrings =3D l" this error :
>=20
> error CS0029: Cannot convert implicitly from `GLib.List' to `string[]'
>=20
> I've seen on monodoc that combo.PopdownStrings accepts string input and
> GLib.List input, right?
>=20
> How can I put GLib.List inside Gtk.Combo?
>=20
> any idea?
>=20
> Best regards.
>=20
> Roberto.
>=20
>=20
>=20
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
--=20
Borja Sanchez Zamorano <borsanza@terra.es>