Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Text control
Text control [message #443540] Mon, 27 September 2004 18:01 Go to next message
Eclipse UserFriend
Originally posted by: roadspeed2002.yahoo.com

How can you force characters entered in a text control to be converted to
upper case. Is there a style that can be defined to do this?
Thanks in advance.
Re: Text control [message #443563 is a reply to message #443540] Tue, 28 September 2004 11:45 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
You should use a VerifyListener to look at each keystroke and change it to
uppercase if needed. For an example of using a VerifyListener see
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet19.java?rev=HEAD&a mp;content-type=text/vnd.viewcvs-markup .
Instead of setting the event's "doit" field value (as the example does), you
should update the event's "text" field value to the character(s) that should
be inserted into the widget.

Grant

"Roadway" <roadspeed2002@yahoo.com> wrote in message
news:cj9kd8$m66$1@eclipse.org...
> How can you force characters entered in a text control to be converted to
> upper case. Is there a style that can be defined to do this?
> Thanks in advance.
>
>
Previous Topic:Problem with Combo on Pocket PC !!
Next Topic:popup asistant
Goto Forum:
  


Current Time: Fri Sep 20 11:33:00 GMT 2024

Powered by FUDForum. Page generated in 0.03901 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top