1. Win32lib: Forcing all caps?

Anyone know how to force an edit field to only accept all caps?

new topic     » topic index » view message » categorize

2. Re: Win32lib: Forcing all caps?

>> 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     » goto parent     » topic index » view message » categorize

3. Re: Win32lib: Forcing all caps?

> From: John Coonrod
> Anyone know how to force an edit field to only accept all caps?

Use style ES_UPPERCASE when you create the control.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

4. Re: Win32lib: Forcing all caps?

That's certainly a lot easier than what I just posted.

>>> MatthewL at KAPCOUSA.COM 08/22/00 01:36PM >>>
> From: John Coonrod
> Anyone know how to force an edit field to only accept all caps?

Use style ES_UPPERCASE when you create the control.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu