Buenas
Tengo un dialogo escrito en PHP, que cuando en una poblaci贸n escribo unos cuantos caracteres, compara con una BD de poblaciones, y si encuentra esos caracteres en el nombre de la poblacion, me ofrece todos los resultados posibles, aqui muestro el video:

Y me gustaria hacer esto en un xbrowse

hacer esa b煤squeda en la columna Poblacion.
Esto lo tengo hecho en un Dialogo:
Pero no me aclaro para hacerlo desde el xbrowse
Mi xbrowse es este:
Esta basado en un array, y la busqueda la quiero hacer sobre una DBF que tiene todas las poblaciones de Espa帽a.
Tengo un dialogo escrito en PHP, que cuando en una poblaci贸n escribo unos cuantos caracteres, compara con una BD de poblaciones, y si encuentra esos caracteres en el nombre de la poblacion, me ofrece todos los resultados posibles, aqui muestro el video:

Y me gustaria hacer esto en un xbrowse

hacer esa b煤squeda en la columna Poblacion.
Esto lo tengo hecho en un Dialogo:
Function Locmun(oDlga)
***********************************************************
local oDlg
local oSay,osay1,oboton,i
local oLbx,ogroup
local oRadmsenu
local oCurDedo
local oFont,oFont1
local cTexto:="Nombre"
local nOpcion:=1
local cTitulo
local obusco,oradmenu
local nClave
local titi:=.F.
local cBusco:=space(25)
local cindi:=munici->(Ordsetfocus())
local cSearch := ""
Publicas:Filtro:=.F.
聽 select("munici")
聽 munici->(Ordsetfocus("cnommun"))
聽 DEFINE DIALOG oDlg RESOURCE "BUSQUEDAIN" 聽BRUSH Publicas:oBrush1 TRANSPARENT Font Publicas:oWPpal:ofont
聽 DEFINE CURSOR oCurDedo RESOURCE "Dedo"
聽 DEFINE FONT oFont 聽NAME "Ms Serif" SIZE 0, 16
聽 DEFINE FONT oFont1 NAME "Ms Serif" SIZE 3, 20 BOLD ITALIC
聽 REDEFINE GROUP oGroup ID 300 COLOR CLR_HBLUE, CLR_GRAY OF oDlg FONT Publicas:oWPpal:oFont TRANSPARENT
聽 REDEFINE SAY oSay VAR cTexto ID 120 OF oDlg COLOR CLR_GREEN UPDATE FONT 聽oFont1
聽 REDEFINE BUTTON oboton ID 111 OF oDlg PROMPT "Pegar" ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ACTION ( Publicas:ncCodmun:=munici->ccodmun,Publicas:ncnommun:=munici->cnommun ,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽Publicas:cControlSal:=Left(Publicas:cControlSal,1)+"*",oDlga:Update(),oDlg:End() )
聽 REDEFINE BUTTON oboton ID 112 OF oDlg PROMPT "Alta" ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ACTION (oDlg:Refresh())WHEN titi=.T.
聽 REDEFINE BUTTON oboton ID 113 OF oDlg PROMPT "Zoom" ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ACTION (oDlg:Refresh())WHEN titi=.T.
聽 REDEFINE BUTTON oboton ID 114 OF oDlg PROMPT "Salir" ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽ACTION (oDlg:End())
聽 REDEFINE RADIO oRadMenu VAR nOpcion ID 117,118 OF oDlg 聽;
聽 聽 聽 聽 聽 聽ON CHANGE ( munici->(OrdSetFocus( iif(nOpcion=1,"ccodmun","cnommun"))),oLbx:Refresh(),cBusco:=iif(nOpcion=1," 聽 聽 ",space(25)),cTexto:=iif(nOpcion=1,"C贸digo","Nombre")+" Municipio",oDlg:Update(),oBusco:SetFocus() )
聽 REDEFINE LISTBOX oLbx FIELDS Munici->ccodmun,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽Munici->cnommun ;
聽 聽 聽 聽 聽 HEADER "C贸digo","Nombre";
聽 聽 聽 聽 聽 聽 聽 聽 聽 ALIAS "Munici";
聽 聽 聽 聽 聽 CURSOR oCurDedo;
聽 聽 聽 聽 聽 COLOR CLR_BLACK, CLR_WHITE ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 ON LEFT DBLCLICK 聽( Publicas:ncCodmun:=munici->ccodmun,Publicas:ncnommun:=munici->cnommun ,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽Publicas:cControlSal:=Left(Publicas:cControlSal,1)+"*",oDlga:Update(),oDlg:End() );
聽 聽 聽 聽 聽 FONT oFont ID 110 OF oDlg
聽 Munici->(dbGoTop())
聽 REDEFINE SAY oBusco VAR cSearch ID 119 OF oDlg COLOR CLR_RED FONT oFont
聽 oLbx:bKeyChar = { | nKey, nFlags | Search( nKey, @cSearch ), olBx:Refresh(),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 oBusco:Refresh() }
聽* oLbx:bUpdateBuffer:= {|| oBusco:Refresh() }
聽* oLbx:bSeek 聽 聽 聽 聽:= {|| oLbx:DbfSeek(.T.) }
聽 oLbx:nStyle:= nOr( WS_VSCROLL, WS_HSCROLL )
聽 oLbx:nLineStyle := 1
聽 oLbx:nClrBackHead := RGB(248,191,36)
聽 oLbx:nClrPane:={||iIF((oLbx:cAlias)->(OrdKeyNo())%2==0,nRGB(245,219,175),nRGB(255,255,255))}
聽 oLbx:bKeyDown := {|nKey| iif(nKey==13, (Publicas:ncCodmun:=munici->ccodmun,Publicas:ncnommun:=munici->cnommun ,;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽Publicas:cControlSal:=Left(Publicas:cControlSal,1)+"*",oDlga:Update(),oDlg:End()), ),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽iif(nKey<>40, ( iif(isdigit(cSearch),munici->(Ordsetfocus("ccodmun")),munici->(Ordsetfocus("cnommun"))) ), ) }
聽 ACTIVATE DIALOG oDlg CENTERED ON INIT (oLbx:SetFocus(), .f. )
聽 munici->(OrdSetFocus(cindi))
聽 RETURN NILMi xbrowse es este:
聽 聽 @ 30, 490 xbrowse oBrw3 OF oDlg ;
聽 聽 Datasource aData3;
聽 聽 AUTOCOLS LINES CELL FOOTERS NOBORDER SIZE -5,-30 PIXEL
聽 聽 聽 聽 AEval( oBrw3:aCols, { |o| o:oDataFont := oFont2} )
聽 聽 聽 聽 WITH OBJECT oBrw3:aCols[ 3 ]
聽 聽 聽 聽 聽 聽 聽 聽 :cHeader 聽 聽:= "Consignatario"
聽 聽 聽 聽 聽 聽 聽 聽 :nWidth聽 聽 聽 聽 := 聽190
聽 聽 聽 聽 聽 聽 聽 聽 :oHeaderFont:=oFont1
聽 聽 聽 聽 END WITH
聽 聽 聽 聽 WITH OBJECT oBrw3:aCols[ 2 ]
聽 聽 聽 聽 聽 聽 聽 聽 :cHeader 聽 聽:= "Domicilio"
聽 聽 聽 聽 聽 聽 聽 聽 :nWidth聽 聽 聽 聽 := 聽180
聽 聽 聽 聽 聽 聽 聽 聽 :oFooterFont:= Publicas:frosa
聽 聽 聽 聽 聽聽 聽 聽 :bFooter 聽 聽 聽 聽:= 聽{ || "SIN CONDUCTOR: "+str(publicas:nalba) 聽}
聽 聽 聽 聽 聽 聽 聽 聽:oHeaderFont:=oFont1
聽 聽 聽 聽 END WITH
聽 聽 聽 聽 WITH OBJECT oBrw3:aCols[ 1 ]
聽 聽 聽 聽 聽 聽 聽 聽 :cHeader 聽 聽:= "Poblacion"
聽 聽 聽 聽 聽 聽 聽 聽 :nWidth聽 聽 聽 聽 := 聽150
聽 聽 聽 聽 聽 聽 聽 聽 :oFooterFont:= Publicas:frosa
聽 聽 聽 聽 聽聽 聽 聽 :bFooter 聽 聽 聽 聽:= 聽{ || "TOTAL: "+str(Manifiesto->(lastrec())) 聽}
聽 聽 聽 聽 聽 聽 聽 聽 :oHeaderFont:=oFont1
聽 聽 聽 聽 聽 聽 聽聽 :nEditType = EDIT_GET
聽 聽 聽 聽 :bOnPostEdit = { | oCol, xVal, nKey | If( nKey == VK_RETURN,Refresca1(xval,oBrw3),),;
聽 聽 聽 聽 聽 聽 聽 聽 聽refrescar(aAlias),xnuconduc:=oBrw1:aCols[4]:value,aData2:=creaelarray2(xnuconduc),aData3:=creaelarray3(xnuconduc),oBrw2:aArrayData:=aData2,oBrw3:aArrayData:=aData3,oBrw1:Refresh(),oBrw2:Refresh(),oBrw3:Refresh()}
聽 聽 聽 聽 END WITH
聽 聽 聽 聽 WITH OBJECT oBrw3:aCols[ 4 ]
聽 聽 聽 聽 聽 聽 聽 聽 :cHeader 聽 聽:= "Bultos"
聽 聽 聽 聽 聽 聽 聽 聽 :nWidth聽 聽 聽 聽 := 聽40
聽 聽 聽 聽 聽 聽 聽 聽 :oHeaderFont:=oFont1
聽 聽 聽 聽 END WITH
聽 聽 聽 聽 WITH OBJECT oBrw3:aCols[ 5 ]
聽 聽 聽 聽 聽 聽 聽 聽 :cHeader 聽 聽:= "Kilos"
聽 聽 聽 聽 聽 聽 聽 聽 :nWidth聽 聽 聽 聽 := 聽40
聽 聽 聽 聽 聽 聽 聽 聽 :oHeaderFont:=oFont1
聽 聽 聽 聽 END WITH
聽 聽 聽 聽 WITH OBJECT oBrw3:aCols[ 6 ]
聽 聽 聽 聽 聽 聽 聽 聽 :cHeader 聽 聽:= "C"
聽 聽 聽 聽 聽 聽 聽 聽 :nWidth聽 聽 聽 聽 := 聽50
聽 聽 聽 聽 聽 聽 聽 聽 :oHeaderFont:=oFont1
聽 聽 聽 聽 END WITH
聽 聽 聽 聽 WITH OBJECT oBrw3:aCols[ 7 ]
聽 聽 聽 聽 聽 聽 聽 聽 :cHeader 聽 聽:= "Orden"
聽 聽 聽 聽 聽 聽 聽 聽 :nWidth聽 聽 聽 聽 := 聽60
聽 聽 聽 聽 聽 聽 聽 聽 :oHeaderFont:=oFont1
聽 聽 聽 聽 END WITH
聽 聽 聽 聽 WITH OBJECT oBrw3:aCols[ 8 ]
聽 聽 聽 聽 聽 聽 聽 聽 :cHeader 聽 聽:= "Albaran"
聽 聽 聽 聽 聽 聽 聽 聽 :nWidth聽 聽 聽 聽 := 聽60
聽 聽 聽 聽 聽 聽 聽 聽 :oHeaderFont:=oFont1
聽 聽 聽 聽 END WITH
聽 聽 聽 聽 WITH OBJECT oBrw3
聽 聽 聽 聽 聽 聽 聽 聽 :SetGroupHeader( "Entregas de otros conductores", 聽1, 聽5, oFont)
聽 聽 聽 聽 聽 聽 聽 聽 :nColDividerStyle := LINESTYLE_BLACK
聽 聽 聽 聽 聽 聽 聽 聽 :lColDividerComplete := .T.
聽 聽 聽 聽 聽 聽 聽 聽 :l2007 := .T.
聽 聽 聽 聽 聽 聽 聽 聽 :nHeadStrAligns:= AL_CENTER
聽 聽 聽 聽 聽 聽 聽 聽:lRecordSelector := .F.
聽 聽 聽 聽 聽 聽 聽 聽:lAllowColHiding := .F.
聽 聽 聽 聽 聽 聽 聽 聽:lAllowColSwapping := .F.
聽 聽 聽 聽 聽 聽 聽 聽:nStretchCol 聽 聽 聽:= 2
聽 聽 聽 聽 聽 聽 聽 聽:bLDblClick:= 聽{|| ponentrega(oBrw3,aAlias),xnuconduc:=oBrw1:aCols[4]:value,aData2:=creaelarray2(xnuconduc),aData3:=creaelarray3(xnuconduc),oBrw2:aArrayData:=aData2,oBrw3:aArrayData:=aData3,oBrw1:Refresh(),oBrw2:Refresh(),oBrw3:Refresh()}
聽 聽 聽 聽 聽 聽 聽 聽 :bClrStd 聽 聽:= {|| If(oBrw3:aArrayData[oBrw3:nArrayAt,6]=space(5) , {CLR_BLACK,nRGB(250,219,216)}, {CLR_BLACK,If( oBrw3:KeyNo % 2 == 0, nRGB(242,247,252),nRGB(207,222,240) )}) }
聽 聽 聽 聽 聽 聽 聽 聽 :nMarqueeStyle := MARQSTYLE_HIGHLROWMS //6
聽 聽 聽 聽 聽 聽 聽 聽:MakeTotals()
聽 聽 END WITH
聽 聽 聽 聽 oBrw3:CreateFromCode()--------------------------
Saludos
Jose Luis
Saludos
Jose Luis