FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Blocking characters
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Blocking characters
Posted: Thu Apr 08, 2010 11:51 PM
Hi,

I am blocking certain characters in a get with the following code:
Code (fw): Select all Collapse
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)
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Blocking characters
Posted: Fri Apr 09, 2010 07:28 AM

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

EMG

Continue the discussion