0

How to set words typed in a combobox to uppercase?

asked 2009-11-21 14:14:40 +0800

giga gravatar image giga
96

The title says it all. Is any way possible?

Take care

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2009-11-22 19:57:26 +0800

joylo0122 gravatar image joylo0122
688 1
www.zkoss.org

@giga

Hi giga, i think you should trans the words by your self, there's no such method can do this.

Regards
/Joy

link publish delete flag offensive edit

answered 2009-11-23 03:38:17 +0800

ahuxham gravatar image ahuxham
3

Not associated to ZK, however a fine example of uppercasing, and checking content:

private void addComputer() {
final String PC_NAME =
addComputerDetailsPC_NAME.getText().toUpperCase().trim();

if (!PC_NAME.matches("^[0-9A-Z\\.]{1,10}$")){
Window.alert("'" + PC_NAME + "' is not a valid character.");
addComputerDetailsPC_NAME.selectAll();
return;
}

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-11-21 14:14:40 +0800

Seen: 557 times

Last updated: Nov 23 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More