1. Re: Win32lib: Forcing all caps? Not quite...

This almost works, however it moves the cursor to the start of the field
after each entry, creating a backwards string. I guess one could reverse the
text each time, but perhaps there is a more elegant solution.

===== Original Message from Euphoria Programming for MS-DOS
<EUPHORIA at LISTSERV.MUOHIO.EDU> at 8/22/00 1:45 pm
>>> Anyone know how to force an edit field to only accept all caps?
>
>Try something that goes like this:
>
>atom editflag -- file scope
>editflag = 0
>
>...
>...
>procedure onChange_edittext()
>
>  sequence text
>
>  if not editflag then
>    editflag = 1
>    text=getText(edittext)
>    text = upper(text)
>    setText(edittext,text)
>  else
>     editflag = 0
>  end if
>
>end procedure
>
>---------------
>
>The onChange procedure is called for each character typed into the field or
>anytime a
procedure changed the value of the field.  The editflag is used to prevent
an infinite loop.  Without it, each change would call the procedure which
would change the field, which would call the procecure ad
>infinitum.  setText and getText should be self-explanatory, and the upper
>function in
wildcard.e takes a sequence and converts all the letters to uppercase.
>
>HTH,
>Michael J. Sabal

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu