SV: [Gtk-sharp-list] Gdk.Color ctr

Steinar Herland steinar.herland@gecko.no
Tue, 1 Apr 2003 11:56:47 +0200


The System.Drawing.Color have these static functions: FromArgb,
FromKnownColor, FromName.

Perhaps it would be appropriate to add these (and more?) to Gdg.Color as
well?

Your sample could then be changed to

using (Gdk.Color c =3D Gdk.Color.FromXXX ("#33ff33") )
{
	// do something interesting with c here.
}

or=20

textview1.ModifyBase (StateType.Normal, new Gdk.Color.FromXXX
("#33ff33"));


(XXX should of course be changed to something appropriate.)
Steinar


-----Opprinnelig melding-----
Fra: Jaime Anguiano Olarra [mailto:jaime@gnome.org]=20
Sendt: 21. mars 2003 18:57
Til: gtk-sharp-list
Emne: [Gtk-sharp-list] Gdk.Color ctr

Hi all!,

I would like to know if you would agree if I add another constructor to
create a Gdk.Color as:

public Color (string spec)

so we can do the same as with Gdk.Color.Parse (string spec, ref
Gdk.Color color)

Then we could just use it for other stuff as:

using (Gdk.Color c =3D new Gdk.Color ("#33ff33")=20
{
	// do something interesting with c here.
}

or=20

textview1.ModifyBase (StateType.Normal, new Gdk.Color ("#33ff33"));

Tell me what do you think.

Cheers,

Jaime.

--=20
http://www.go-mono.org -- The Mono Project, .net + freedom.
_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list