Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to convert characters the User enters into a Textbox to CAPs conditionally?
How to convert characters the User enters into a Textbox to CAPs conditionally? [message #1219507] Wed, 04 December 2013 10:38
Tilak Sharma is currently offline Tilak SharmaFriend
Messages: 48
Registered: July 2009
Member
How to convert characters the User enters into a Textbox to CAPs conditionally?

We have a peculiar use-case where in, we have:


  • 1 A Textbox (org.eclipse.swt.widgets.Text), in which user types in.
  • 2 A checkbox (which reads: Convert to Uppercase)


If this checkbox is Checked, each of the character the User types in from that moment should be converted to Capital letter.
If he unchecks that and types again, we should retain the earlier text as it is and continue to accept the letters as he types in, without any case modification.

We tried using the org.eclipse.swt.events.KeyListener, but we are compelled to handle all the cases like, Backspace, Control, Delete, Tab, Num Pad key presses, etc.

We also tried VerifyListener, but that gives me the complete text and not just the recently typed in character/key.

Is there a simple way to achieve this?

Thanks,
Tilak

[Updated on: Wed, 04 December 2013 11:42]

Report message to a moderator

Previous Topic:Layout Manager for display on one line
Next Topic:How Program.launch(mailto) can find email client is not set?
Goto Forum:
  


Current Time: Thu Sep 26 08:56:45 GMT 2024

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

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

Back to the top