![]() |
|
Convert IWEdit1.text to Uppercase - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: Convert IWEdit1.text to Uppercase (/thread-1263.html) |
Convert IWEdit1.text to Uppercase - SorenJensen - 09-23-2019 Hi All, In an IWEdit field, I need the input to be in uppercase chars. I'm currently doing it as part of the SQL insert command, where each NVarChar field is converted with ".toupper", so that the saved value is correct. It also means I can search for the value, even with lowercase chars. However, I would like to do it, char by char, while the user is typing. I am already looking a each keydown for the fields in question, in combination with searches. Is it possible to do the conversion between the keydown event is fired, and the pressed key is shown in the edit field ? That way it would be transparent for the user. Is there an easy way of doing it and it, how is it done ? Regards Soren RE: Convert IWEdit1.text to Uppercase - Jose Nilton Pace - 09-23-2019 Hi Soren. If i understand, you can put in your IWEdit->ScriptEvents->onKeyUp: Code: this.value = this.value.toUpperCase();RE: Convert IWEdit1.text to Uppercase - SorenJensen - 09-23-2019 Hi Jose, Thanks. I have tried something like that before, but not the way you specify it, and also, not been observing the case sensitive function names. It is working quite nicely, and in fact it works just with: this.value = this.value.toUpperCase() No return true, and no ; at the end of the this.value line. And it look nice too. You just very shortly see the lowercase char in the field being replaced by the capital char. Very nice. Again thanks for the quick reply. Regards Soren |