help with xbrowse

help with xbrowse

Postby wartiaga » Thu Feb 17, 2022 5:49 pm

Hi,
I have this function below that is executed when I press f2 in get. As soon as I type something the search is done correctly and brings me only the results that are part of the searched string. The problem is that when I close the window and open it again, it already brings me the previous search, how can I reset the search?
Thanks in advance!

Static Function ListaCon2()

oPlano:SetOrder("DESCRICAO")
oPlano:OrdScope(0,Nil)
oPlano:OrdScope(1,Nil)
oPlano:GoTop()

DEFINE DIALOG oDlgConta RESOURCE "LISTACONTA2"

Lista10 := TXBrowse():New( oDlgConta )
Lista10:nMarqueeStyle := MARQSTYLE_HIGHLROW
Lista10:nColDividerStyle := LINESTYLE_BLACK
Lista10:nRowDividerStyle := LINESTYLE_BLACK
Lista10:CreateFromResource( 109 )

oCol:= Lista10:AddCol()
oCol:bStrData := { || PLANO->CODIGO}
oCol:cHeader := "CÓDIGO"

oCol:= Lista10:AddCol()
oCol:bStrData := { || PLANO->DESCRICAO}
oCol:cHeader := "DESCRIÇÃO"

oCol:= Lista10:AddCol()
oCol:bStrData := { || PLANO->DC}
oCol:cHeader := "D/C"

Lista10:l2007:=.t.
Lista10:cAlias := "PLANO"
Lista10:nStretchCol := STRETCHCOL_LAST

Lista10:lSeekBar := .T.
Lista10:lIncrFilter := .T.
Lista10:lSeekWild := .T.
Lista10:lAutoSort := .T.
Lista10:lFastEdit := .T.

lista10:aCols[1]:cOrdBag := "PLANO"
Lista10:aCols[1]:cSortOrder := "CODIGO"

lista10:aCols[2]:cOrdBag := "PLANO"
Lista10:aCols[2]:cSortOrder := "DESCRICAO"

Lista10:bKeyDown:={|nKey| IIF(nKey=VK_RETURN,SelConta(Lista10),)}

REDEFINE BUTTONBMP botao12 ID 121 of oDlgConta BITMAP "CANCELAR" Cancel Action oDlgConta:End() TEXTRIGHT

ACTIVATE DIALOG oDlgConta CENTERED ON INIT Zera()

Return .t.
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 71 guests