Re: Error when tryijng to use Upper()

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message ----- 
>From: ronaustin at alltel.net 
>Subject: Error when tryijng to use Upper()
>
>
>
>I included wildcard.e and misc.e in my program and wrote 
>to following to force text to upper case when it was saved.
>
>err = db_insert(Upper(getText(Code)),Upper(getText(Desc)))
>
>I get an error stating that "Upper is not defined".  What 
>am I doing wrong?
>

The correct spelling for the uppercase conversion routine is 'upper' and not
'Upper'. Euphoria is a case-sensitive, just like C++ is.

>I would really prefer that the text be entered in upper case
>as the user types it, but I don't see any way to do that 
>unless I get the letters one at a time, convert them to 
>upper case and then display them back on the screen.
>
>It would be nice if a flag could indicate that text should 
>be entered in upper case when using the SleText  control.

Use the flag ES_UPPER when creating the control.

For example:
   Code = create(SleText, "", MainWin, l,t,w,h, ES_UPPERCASE)


Other flags that might be useful with 'edit' controls are ...

    ES_CENTER -- center the text
    ES_RIGHT -- right align the text
    ES_LOWERCASE -- force only lowercase 
    ES_PASSWORD -- display '*' for each character
    ES_NOHIDESEL -- don't hide the selection when it loses focus
    ES_DISABLENOSCROLL -- disable, rather than hide, unwanted scrollbars
    ES_READONLY -- don't allow text to be modified by the keyboard.
    ES_WANTRETURN -- insert the return-character
    ES_NUMBER -- only allow digits

-- 
Derek

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu