syspel Posted March 29, 2017 Report Share Posted March 29, 2017 bom dia pessoal, estiou fazendo uma pesquisa por coidigo no listbox,, o registro e encontrado mais o ponteiro nao fica em cima do registro no listbox alguem sabe como fazer isto ? obrigado carlos fwh 1404 xhabr 123 dbf Quote Link to comment Share on other sites More sharing options...
Theotokos Posted March 29, 2017 Report Share Posted March 29, 2017 posta o codigo fonte da pesquisa... qual tipo de dados esta usando no listbox? DBF, ARRAY.... Quote Link to comment Share on other sites More sharing options...
syspel Posted March 29, 2017 Author Report Share Posted March 29, 2017 a pesquin nao e array e uma pesquisa simples Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 29, 2017 Report Share Posted March 29, 2017 Mostre o código para vemos onde você está errando. Quote Link to comment Share on other sites More sharing options...
syspel Posted March 29, 2017 Author Report Share Posted March 29, 2017 Function serv53 Local tobp Sele Codstmdo set order to 2 go top vsdescri=space(40) Define Dialog fd1 from 1.5,15 to 20.5,77 title "Codigo de Serviço " style 0 @ 0.4,0.8 LISTBOX tobp FIELDS Codstmdo->s_codigo,Codstmdo->s_descric ; ALIAS"Codstmdo"HEADERS'Código','Descrição' size 230,90 ; OF fd1 On DblClick (Beep(),pufaf53(saget),fd1:end()) font ofont3 tobp:lMChange := .F. // Desabilita Mousemove tobp:SetFocus() // Refocus on The Browse tobp:Refresh() // Estabiliza o browse/listbox tobp:Default() // Para SetFilter() // Acho... Sei lá... tobp:nRowPos := 1 // ?? Ver com Vagner Wirts... Sei lá... Uso WorkShop.Exe tobp:bkeydown={| nkey | pufeca53(nkey) } tobp:bMMoved = { | nRow, nCol, nFlags | aadesc53() } sysrefresh() @ 6.9,3 say "Nome:" of fd1 size 18,10 font ofont3 @ 7.9,5 get oas var vsdescri pict "@!" of fd1 size 150,10 font ofont3 valid busacca53() Activate dialog fd1 centered set order to 1 saget[1]:refresh() saget[1]:setfocus() Return .T. Static Function pufaf53(iget) saget[1]:VarPut(Codstmdo->s_codigo) ; saget[1]:Refresh() Return(Nil) Static Function pufeca53(nkey) if nkey=13 saget[1]:VarPut(Codstmdo->s_codigo) saget[1]:Refresh() saget[1]:setfocus() fd1:end() endif Return(Nil) Function busacca53 if ! empty(vsdescri) select codstmdo set order to 2 seek alltrim(vsdescri) if ! found() msgstop("Codigo nao existe","Aviso") select codstmdo set order to 2 go top return .f. endif endif aa=recno() go aa oas:refresh() return .t. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 29, 2017 Report Share Posted March 29, 2017 Você sabe para que serve o comando sysrefresh(), já o viu em algum exemplo de LISTBOX no \samples? sysrefresh() Quote Link to comment Share on other sites More sharing options...
Theotokos Posted March 29, 2017 Report Share Posted March 29, 2017 Function serv53PRIVATE tobp Sele Codstmdo set order to 2 go top vsdescri=space(40) Define Dialog fd1 from 1.5,15 to 20.5,77 title "Codigo de Serviço " style 0 @ 0.4,0.8 LISTBOX tobp FIELDS Codstmdo->s_codigo,Codstmdo->s_descric ; ALIAS"Codstmdo"HEADERS'Código','Descrição' size 230,90 ; OF fd1 On DblClick (Beep(),pufaf53(saget),fd1:end()) font ofont3 tobp:lMChange := .F. // Desabilita Mousemove tobp:SetFocus() // Refocus on The Browse tobp:Refresh() // Estabiliza o browse/listbox tobp:Default() // Para SetFilter() // Acho... Sei lá... tobp:nRowPos := 1 // ?? Ver com Vagner Wirts... Sei lá... Uso WorkShop.Exe tobp:bkeydown={| nkey | pufeca53(nkey) } tobp:bMMoved = { | nRow, nCol, nFlags | aadesc53() } sysrefresh() @ 6.9,3 say "Nome:" of fd1 size 18,10 font ofont3 @ 7.9,5 get oas var vsdescri pict "@!" of fd1 size 150,10 font ofont3 valid busacca53() Activate dialog fd1 centered set order to 1 saget[1]:refresh() saget[1]:setfocus() Return .T. Static Function pufaf53(iget) saget[1]:VarPut(Codstmdo->s_codigo) ; saget[1]:Refresh() Return(Nil) Static Function pufeca53(nkey) if nkey=13 saget[1]:VarPut(Codstmdo->s_codigo) saget[1]:Refresh() saget[1]:setfocus() fd1:end() endif Return(Nil) Function busacca53 LOCAL lReturn := .F. if !empty(vsdescri) if !DbSeek( AllTrim(vsDescri) ) msgstop("Codigo nao existe","Aviso") lReturn := .F. endifendif tobp:Refresh()return .t. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 29, 2017 Report Share Posted March 29, 2017 MEMVAR tobp Function serv53 PRIVATE tobp Sele Codstmdo set order to 2 go top vsdescri=space(40) Define Dialog fd1 from 1.5,15 to 20.5,77 title "Codigo de Serviço " style 0 fd1:lHelpIcon := .F. @ 0.4,0.8 LISTBOX tobp FIELDS Codstmdo->s_codigo,Codstmdo->s_descric ; ALIAS"Codstmdo"HEADERS'Código','Descrição' size 230,90 ; OF fd1 On DblClick (Beep(),pufaf53(saget),fd1:end()) font ofont3 tobp:lMChange := .F. // Desabilita Mousemove tobp:SetFocus() // Refocus on The Browse tobp:Refresh() // Estabiliza o browse/listbox tobp:Default() // Para SetFilter() // Acho... Sei lá... tobp:nRowPos := 1 // ?? Ver com Vagner Wirts... Sei lá... Uso WorkShop.Exe tobp:bkeydown={| nkey | pufeca53(nkey) } tobp:bMMoved = { | nRow, nCol, nFlags | aadesc53() } // sysrefresh() PARA REFRESCAR LOOPINS WHILE... ENDDO por exemplo @ 6.9,3 say "Nome:" of fd1 size 18,10 font ofont3 @ 7.9,5 get oas var vsdescri pict "@!" of fd1 size 150,10 font ofont3 valid busacca53() Activate dialog fd1 centered set order to 1 saget[1]:refresh() saget[1]:setfocus() Return .T. Static Function pufaf53(iget) saget[1]:VarPut(Codstmdo->s_codigo) ; saget[1]:Refresh() Return(Nil) Static Function pufeca53(nkey) if nkey=13 saget[1]:VarPut(Codstmdo->s_codigo) saget[1]:Refresh() saget[1]:setfocus() fd1:end() endif Return(Nil) Function busacca53 LOCAL lReturn := .F. if !empty(vsdescri) if !DbSeek( AllTrim(vsDescri) ) msgstop("Codigo nao existe","Aviso") lReturn := .F. endif endif tobp:Refresh() return .t. syspel 1 Quote Link to comment Share on other sites More sharing options...
syspel Posted April 3, 2017 Author Report Share Posted April 3, 2017 ok garoto deu certo obrigado carlos 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.