Página 1 de 1

Testar se o controle é getbox

Enviado: 14 Fev 2024 12:29
por JoséQuintas
Tem outro jeito de testar se o controle é getbox ?

Código: Selecionar todos

      IF hb_ASCan( HMG_GetFormControls( xDlg, "GETBOX" ), { | e | e == GetProperty( xDlg, "FOCUSEDCONTROL" ) } ) != 0
Talvez algo do tipo:

Código: Selecionar todos

GetProperty( GetProperty( "FOCUSEDCONTROL" ), "CONTROLTYPE" ) == GETBOX"

Testar se o controle é getbox

Enviado: 14 Fev 2024 12:45
por JoséQuintas
Achei.

Código: Selecionar todos

      IF GetProperty( xDlg, GetProperty( xDlg, "FOCUSEDCONTROL" ), "TYPE" ) == "GETBOX"
        // hb_ASCan( HMG_GetFormControls( xDlg, "GETBOX" ), { | e | e == GetProperty( xDlg, "FOCUSEDCONTROL" ) } ) != 0
Só não sei dizer se ficou melhor

Ou se precisa testar se algum é Empty()

Testar se o controle é getbox

Enviado: 14 Fev 2024 18:30
por alxsts
Olá!

Não entendo nada desta lib mas lembrei de uma função genérica: IsKindOf(). Precisa testar.