[Gtk-sharp-list] GtkEntry: UpperCase, NormalCase or LowerCase
brad at getcoded.net
Thu Jun 16 10:17:46 EDT 2005
> Some property exists to modify a Case in GtkEntry ?
GtkEntry doesn't have a property to alter the case of its contents, but
you can do the same thing using System.String's ToLower and ToUpper
functions. For instance,
Entry entry = new Entry ("Some Text");
entry.Text = entry.Text.ToLower (); // would give you "some text"
entry.Text = entry.Text.ToUpper (); // would give you "SOME TEXT"
And, if you want title case, you can use the current culture:
Entry entry = new Entry ("some text");
entry.Text = Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase
(entry.Text); // gives you "Some Text"
Hope this helps.
Genome Software LLC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://galactus.ximian.com/pipermail/gtk-sharp-list/attachments/20050616/8b94570c/attachment.bin
More information about the Gtk-sharp-list