Skip to main content



      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 05:38
Eclipse UserFriend
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 06:42] by 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: Mon Jul 21 00:29:25 EDT 2025

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

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

Back to the top