Blocking characters

Blocking characters

Postby Jeff Barnes » Thu Apr 08, 2010 11:51 pm

Hi,

I am blocking certain characters in a get with the following code:
Code: Select all  Expand view
Function CheckName(oGet)
   Local cChar := RIGHT( ALLTRIM(oGet:cText()),1)
   IF cChar $ "!@#$%^&*+=[]\|:;,./?<>" .or. cChar=chr(34) .or. cChar=chr(39)
      oget:oget:backspace()
      oget:editupdate()
      MsgInfo("You cannot use "+cChar+" in this field","Invalid Charactor")
   endif
Return .t.


Can someone tell me how I would do this with a Combobox?
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Blocking characters

Postby Enrico Maria Giordano » Fri Apr 09, 2010 7:28 am

As dropdown style combobox has a GET on it, you may try to use oCbx:oGet in your code.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 54 guests