Jump to content
Fivewin Brasil

Saber qual elemento de aControls[]


jfaguiar

Recommended Posts

Boa tarde amigos.

Alguém sabe me dizer se tem como saber qual em qual controle (posição de aControls[]) estar o foco.

Exemplo:

@ 1,1 GET cGET1 VALID( MsgInfo("Que control é este ?"),.T. )

@ 2,1 GET cGET2

Obrigado

Static Function ChkControl(oDlg)
Local x,oCon
For x := 1 To Len(oDlg:aControls)
oCon := oDlg:aControls[x]
If oCon:ClassName() $ "TCOMBOBOX/TMULTIGET/TGET"
If oCon:lFocused
//Esta Focado
Endif
Endif
Next x
Return(Nil)
Link to comment
Share on other sites

Olá Giba, kapiaba.

Valeu as colaborações. Estava procurando uma solução para passar nas combobox com <ENTER>, na vr FW 13.07 xHabour.

Resolvi assim:

@ 01,01 SAY "Formulário:"
@ 02,01 COMBOBOX oCbx VAR cOPCQTDE ITEMS {"Por Tonelada","Por Qtde. Coletada"} SIZE 70,800 OF oDlg;
ON CHANGE ( nOPCQTDE := oCbx:nAt,oCbx:Refresh() );
VALID IF( GetASyncKey( VK_RETURN ) .OR. GetASyncKey( VK_DOWN ), .T.,.T. )
@ 03,01 SAY "Informe o ano:"

@ 04,01 GET cANO PICT "9999"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...