consulta comportamiento de get()

76 views
Skip to first unread message

Daniel Aisenberg

unread,
Oct 23, 2025, 1:10:08 PM (8 days ago) Oct 23
to harbou...@googlegroups.com
Buenas tardes:
Describo el caso:
si uno pone 

@1,1 say "xxx" Get sVariable
READ
cuando el Get activa su foco tiene un cursor titilante.

Pero.. si hago

oGet:=get():New(1,1, b1, "sVariable")
y luego
oGet:reader:=bloqueAdHocParaLectura

El cursor desaparece al hacer luego el ReadModal( {oGet} )

En realidad mi objetivo es hacer que todas las teclas digitadas en el get se enmascaren como "*" (asterisco) o cualquier otro, para ocultar la escritura de una clave. No vi que exista un Picture para ese fin.
¿Algún consejo?
Muchas gracias.

arielso...@gmail.com

unread,
Oct 23, 2025, 1:53:49 PM (7 days ago) Oct 23
to harbou...@googlegroups.com

Hola, prueba

 

GGET de la librería grumpfish

En Harbour esta como

Libgrump.a para Mingw

 

PASS:= SPACE(5)    

@11, 30 GGET PASS PICTURE "@!S5" PASSWORD"*"

SETCURSOR(3)

READ

SETCURSOR(1)

 

Saludos!!

--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/CACAt13wci3F%2B6wFO_qEN3jojk-BvfpJTz6i0AB3VPNG0r0JbmQ%40mail.gmail.com.

Daniel Aisenberg

unread,
Oct 23, 2025, 2:18:47 PM (7 days ago) Oct 23
to harbou...@googlegroups.com
Muy bueno, gracias. Había leído la existencia de esa cláusula "password" pero no la tengo disponible en mi instalación.
Sabés donde se obtiene? De todos modos el setCursor() me resolvió el tema del cursor.

arielso...@gmail.com

unread,
Oct 23, 2025, 2:47:43 PM (7 days ago) Oct 23
to harbou...@googlegroups.com

Hola, solo anexa a tu compilación

La librería:

Libgrump.a

Si estas compilando con mingw

En Harbour 3.2

Guillermo Varona Silupú

unread,
Oct 23, 2025, 3:12:35 PM (7 days ago) Oct 23
to harbou...@googlegroups.com
Hola, la verdad no sé de donde obtuve esto, pero es lo que uso en éstos casos:
-------------------------------------------------------------------------------------------
#command @ <row>, <col> GETPWD <v> [PICTURE <pic>] ;
                                   [VALID <valid>] [WHEN <when>] [SEND <snd>] ;
                                   [CAPTION <cap>] [MESSAGE <msg>] => ;
         SetPos( <row>, <col> ) ;;
         AAdd( GetList, hb_Get():new( <row>, <col>, , <"v"> [, <pic> ]) ) ;;
         ATail( GetList ):hideInput( .t. ) ;;
       [ ATail( GetList ):postBlock( <{valid}> );];
       [ ATail( GetList ):preBlock( <{when}> );];
       [ ATail( GetList ):Caption := <cap> ;;
         ATail( GetList ):CapRow := ATail( Getlist ):row ;;
         ATail( GetList ):CapCol := ATail( Getlist ):col - __CapLength( <cap> ) - 1 ;] ;;
       [ ATail( GetList ):message := <msg> ;] [ ATail( GetList ):<snd> ;] ;;
         ATail( GetList ):Display()

   @ 1, 11 GET    cNom_Usr VALID Nom_Usr( cNom_Usr, GetList ) CAPTION "&Usuario:" MESS "Digite su Cód. de Usuario"
   @ 3, 11 GETPWD cPas_Usr VALID ErrorGVS( Pas_Usr( cPas_Usr, GetList ), 'PassWord no válido' ) CAPTION "&PassWord:" MESS "Digite su Clave"
   READ MSG AT nMaxFilW, 0, nMaxColW MSG COLOR "B+/W"
-------------------------------------------------------------------------------------------

Espero te pueda ser util.

BR
GVARONAS

--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/CACAt13wci3F%2B6wFO_qEN3jojk-BvfpJTz6i0AB3VPNG0r0JbmQ%40mail.gmail.com.


--
Atentamente,
Ing. Guillermo Varona Silupú
Piura - Perú

Jose Antonio Leon Tellez

unread,
Oct 23, 2025, 3:36:56 PM (7 days ago) Oct 23
to harbou...@googlegroups.com
Hi, Daniel,  use:


Keyboard input function for hidden input (similar to a GET field):  
GetSecret(<cDefault>,[<nRow>],[<nColumn>],[<lSAY>], [<cPrompt>]) -> cInput

Example:

cVar:= "Default text"
GetSecret(cVar, 10, 20, .T., "Please input: ")


https://harbour.github.io/doc/clct3.html#getsecret


Saludos,

José Antonio León Téllez

Reply all
Reply to author
Forward
0 new messages