problemilla con la ñ

Post Reply
Uri
Posts: 6
Joined: Fri Mar 02, 2007 12:39 pm
Location: Granada-España

problemilla con la ñ

Post by Uri »

¿Como _ la letra ñ en mayúscula?
Con el picture "@!" ingreso todas las letras en mayúscula (independientemente si tengo activado ó no el Bloq-Mayús).
Menos la ñ.
Gracias.
User avatar
Willi Quintana
Posts: 859
Joined: Sun Oct 09, 2005 10:41 pm
Location: Cusco - Perú
Contact:

Post by Willi Quintana »

Holas,,
Luego de la captura (ouede ser en el valid) podrias usar esto:

Function RevisaLetras(cDat)
local nLen, nCont
If VALTYPE(cDat) = "A" // es un array
nLen := LEN(cDat)
FOR nCont := 1 TO nLen
IF VALTYPE(cDat[nCont]) = "C"
cDat[nCont] := STRTRAN(cDat[nCont],"'","´")
cDat[nCont] := STRTRAN(cDat[nCont],"'","´")
cDat[nCont] := STRTRAN(cDat[nCont],"ñ","Ñ")
ENDIF
NEXT nCont
Else
cDat := STRTRAN(cDat,"'","´")
cDat := STRTRAN(cDat,"`","´")
cDat := STRTRAN(cDat,"ñ","Ñ")
EndIF
Return(cDat)
User avatar
Patricio Avalos Aguirre
Posts: 1028
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile
Contact:

Post by Patricio Avalos Aguirre »

Uri

modifica la clase tget en la METHOD KeyChar

yo la modifique asi

Code: Select all

   if ! Empty( ::cPicture ) .and. '@!' $ ::cPicture
      nKey = Asc( Upper( Chr( nKey ) ) )
		//patricio
		if nKey = 241 // ñ
			nKey := 209 // Ñ
		endif
		//fin patricio
   endif
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Uri
Posts: 6
Joined: Fri Mar 02, 2007 12:39 pm
Location: Granada-España

Post by Uri »

Gracias, voy a intentarlo.
Post Reply