In my previous post, you said that the way I built xBrowse was inadequate. Could you explain that?
The way you suggested it doesn't work properly, but the way I used it does it correctly.
See codes and equivalent images.
So it doesn't work
Code: Select all
@ 0069,0000 XBROWSE oBrwLOTES OF oDlgLOTES SIZE 0520,0230 STYLE FLAT PIXEL NOBORDER DATASOURCE oRsLOTES ;
COLUMNS PEGANOMELOTEAMENTO(oRsLOTES:loteamento,@cNOMELOTEAMENTO),"quadra","lote","rua" ;
HEADERS "Loteamento","Quadra","Lote","Rua" ;
COLSIZES 0455,0065,0045,0455 ;
PICTURES "@!","99","999","@!"
Code: Select all
@ 0069,0000 XBROWSE oBrwLOTES OF oDlgLOTES SIZE 0520,0230 STYLE FLAT PIXEL NOBORDER DATASOURCE oRsLOTES
ADD TO oBrwLOTES DATA PEGANOMELOTEAMENTO(oRsLOTES:loteamento,@cNOMELOTEAMENTO) PICTURE "@!" HEADER "Loteamento" SIZE 0455
ADD TO oBrwLOTES DATA oRsLOTES:quadra PICTURE "@!" HEADER "99" SIZE 0065
ADD TO oBrwLOTES DATA oRsLOTES:lote PICTURE "@!" HEADER "999" SIZE 0045
ADD TO oBrwLOTES DATA oRsLOTES:rua PICTURE "@!" HEADER "Rua" SIZE 0455
Code: Select all
***************************************************************************************************
STATIC FUNCTION PEGANOMELOTEAMENTO(cLOTEAMENTO,cNOMELOTEAMENTO)
***************************************************************************************************
IF oRsLOTEAMENTOS:Seek(cLOTEAMENTO)
cNOMELOTEAMENTO := STRZERO(cLOTEAMENTO,3) + " - " + ALLTRIM(oRsLOTEAMENTOS:nome)
ELSE
cNOMELOTEAMENTO := "Loteamento não encontrado"
ENDIF
RETURN cNOMELOTEAMENTO