VLNUNES Posted March 25, 2016 Report Share Posted March 25, 2016 Olá a todos; Tenho que posicionar o cursor sempre na 1ª linha da listbox após um filtro, tem como ? Após selecionar este filtro, posicionar na 1ª linha //----------------------------------------- REDEFINE COMBOBOX oCATEGO VAR mgenerF ITEMS geneF ID 112 OF TELAVEND1 VALID FILTRTP(mgenerF) WHEN TEMCLI //----------------------------------------- Listbox em questão //----------------------------------------- REDEFINE LISTBOX LIACER224 FIELDS ESTOQU->(STRZERO(CODLOJA,5)) +" |"+ ; ESTOQU->(SUBSTR(DESCRIC,1,42)) +"|"+ ; ESTOQU->(STRZERO(QUANTES,4)) +"|"+ ; ESTOQU->(TRANSFORM(VEVISTA,"@E 99999.99"))+"|"+ ; ESTOQU->(TRANSFORM(VEPRAZO,"@E 99999.99"))+"|"+ ; ESTOQU->(TRANSFORM(VEPLAAV,"@E 99999.99"))+"|"+ ; ESTOQU->(TRANSFORM(VEPLAPR,"@E 99999.99")) ID 110 ; HEADERS "CÓDIGO|DESCRIÇÃO |QDE.|À VISTA|À PRAZO|PLANO AV|PLANO PR" ; FONT FONTVEND12 COLOR RGB (000,000,000),RGB (255,255,192) ; ON LEFT DBLCLICK(ENVIALISTA1(xTEMPLA)) WHEN TEMCLI //----------------------------------------- Filtro esta funcionando, mas o quando volta para a listbox fica todo bagunçado //----------------------------------------- FUNCTION FILTRTP(mgenerF) SELECT ESTOQU IF mgenerF = "* TODOS *" SET FILTER TO ELSE SET FILTER TO TPMERCA = mgenerF ENDIF DBGOTOP() LIACER224 :Refresh() // Estabiliza o Browse/Listbox xSetFocus( LIACER224 ) RETURN .T. //----------------------------------------- Obrigado; Vander Ronaldbuch 1 Quote Link to comment Share on other sites More sharing options...
Theotokos Posted March 25, 2016 Report Share Posted March 25, 2016 tenta assim: LIACER224:GoTop() LIACER224:Refresh() Quote Link to comment Share on other sites More sharing options...
VLNUNES Posted March 26, 2016 Author Report Share Posted March 26, 2016 Obrigado Theotokos, ficou ótimo. Vander Theotokos 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.