 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Shane Holmes Guest
|
Posted: Wed Apr 11, 2007 10:45 pm Post subject: TIWEdit Uppercase |
|
|
Is there a way to force all chars in TIWEdit to be Uppercase?
I need the chars in my TIWEdit to always be appercase.
I know I can pass them as uppercase later, using Uppercase(), but I would
like it to be visual in the TIWEdit as well.
Thanks
S |
|
| Back to top |
|
 |
Joel Guest
|
Posted: Wed Apr 11, 2007 10:53 pm Post subject: Re: TIWEdit Uppercase |
|
|
Add javascript to do it or use TMS components
"Shane Holmes" <holmesshanea @ yahoo . com> wrote in message
news:461d1ea0$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Is there a way to force all chars in TIWEdit to be Uppercase?
I need the chars in my TIWEdit to always be appercase.
I know I can pass them as uppercase later, using Uppercase(), but I would
like it to be visual in the TIWEdit as well.
Thanks
S
|
|
|
| Back to top |
|
 |
Shane Holmes Guest
|
Posted: Wed Apr 11, 2007 11:52 pm Post subject: Re: TIWEdit Uppercase |
|
|
Thanks Joel
Any suggestions on how to do this using JavaScript?
Thanks
S
"Joel" <nowhere (AT) nowhere (DOT) com> wrote in message
news:461d20a4$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Add javascript to do it or use TMS components
"Shane Holmes" <holmesshanea @ yahoo . com> wrote in message
news:461d1ea0$1 (AT) newsgroups (DOT) borland.com...
Is there a way to force all chars in TIWEdit to be Uppercase?
I need the chars in my TIWEdit to always be appercase.
I know I can pass them as uppercase later, using Uppercase(), but I would
like it to be visual in the TIWEdit as well.
Thanks
S
|
|
|
| Back to top |
|
 |
Joel Guest
|
Posted: Thu Apr 12, 2007 7:30 pm Post subject: Re: TIWEdit Uppercase |
|
|
Here is an example
Put this in the Javascript property of the form
function mask(textbox,loc,delim,maxlen){
var
locs = loc.split(',');
str = textbox.value.substring(0,maxlen);
for (var i = 0; i <= locs.length; i++){
for (var k = 0; k <= str.length; k++){
if (k == locs[i]){
if (str.substring(k, k+1) != delim){
str = str.substring(0,k) + delim + str.substring(k,str.length)
}
}
}
}
textbox.value = str
}
then put this in the onblur on a iwedit scriptevents.
mask(IWEDIT1IWCL,"3,7","-", 12);
"Shane Holmes" <holmesshanea @ yahoo . com> wrote in message
news:461d2e30$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Thanks Joel
Any suggestions on how to do this using JavaScript?
Thanks
S
"Joel" <nowhere (AT) nowhere (DOT) com> wrote in message
news:461d20a4$1 (AT) newsgroups (DOT) borland.com...
Add javascript to do it or use TMS components
"Shane Holmes" <holmesshanea @ yahoo . com> wrote in message
news:461d1ea0$1 (AT) newsgroups (DOT) borland.com...
Is there a way to force all chars in TIWEdit to be Uppercase?
I need the chars in my TIWEdit to always be appercase.
I know I can pass them as uppercase later, using Uppercase(), but I
would like it to be visual in the TIWEdit as well.
Thanks
S
|
|
|
| Back to top |
|
 |
Shane Holmes Guest
|
Posted: Thu Apr 12, 2007 7:31 pm Post subject: Re: TIWEdit Uppercase |
|
|
THANKS!
"Joel" <nowhere (AT) nowhere (DOT) com> wrote in message
news:461e4271$2 (AT) newsgroups (DOT) borland.com...
| Quote: | Here is an example
Put this in the Javascript property of the form
function mask(textbox,loc,delim,maxlen){
var
locs = loc.split(',');
str = textbox.value.substring(0,maxlen);
for (var i = 0; i <= locs.length; i++){
for (var k = 0; k <= str.length; k++){
if (k == locs[i]){
if (str.substring(k, k+1) != delim){
str = str.substring(0,k) + delim + str.substring(k,str.length)
}
}
}
}
textbox.value = str
}
then put this in the onblur on a iwedit scriptevents.
mask(IWEDIT1IWCL,"3,7","-", 12);
"Shane Holmes" <holmesshanea @ yahoo . com> wrote in message
news:461d2e30$1 (AT) newsgroups (DOT) borland.com...
Thanks Joel
Any suggestions on how to do this using JavaScript?
Thanks
S
"Joel" <nowhere (AT) nowhere (DOT) com> wrote in message
news:461d20a4$1 (AT) newsgroups (DOT) borland.com...
Add javascript to do it or use TMS components
"Shane Holmes" <holmesshanea @ yahoo . com> wrote in message
news:461d1ea0$1 (AT) newsgroups (DOT) borland.com...
Is there a way to force all chars in TIWEdit to be Uppercase?
I need the chars in my TIWEdit to always be appercase.
I know I can pass them as uppercase later, using Uppercase(), but I
would like it to be visual in the TIWEdit as well.
Thanks
S
|
|
|
| Back to top |
|
 |
Farshad Guest
|
Posted: Thu Apr 12, 2007 8:06 pm Post subject: Re: TIWEdit Uppercase |
|
|
In OnKeyPress event of IWEdit add this:
return uppercase();
In JavaScript of main form add the following:
function uppercase()
{
key = window.event.keyCode;
if ((key > 0x60) && (key < 0x7B))
window.event.keyCode = key-0x20;
return true;
}
However it only works in IE but the effect is immediate as the user types
the characters.
| Quote: | Any suggestions on how to do this using JavaScript?
Thanks
S |
|
|
| Back to top |
|
 |
Shane Holmes Guest
|
Posted: Thu Apr 12, 2007 8:41 pm Post subject: Re: TIWEdit Uppercase |
|
|
THANK YOU!
"Farshad" <farshad (AT) fmsoft (DOT) net> wrote in message
news:461e4b09 (AT) newsgroups (DOT) borland.com...
| Quote: | In OnKeyPress event of IWEdit add this:
return uppercase();
In JavaScript of main form add the following:
function uppercase()
{
key = window.event.keyCode;
if ((key > 0x60) && (key < 0x7B))
window.event.keyCode = key-0x20;
return true;
}
However it only works in IE but the effect is immediate as the user types
the characters.
Any suggestions on how to do this using JavaScript?
Thanks
S
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|