I'm working with a sample prg, where i want to have a get/seek field in Xbrowse.
The sample works ok when all fields are used, and the field folow the database structure
My code will use some fields of the database, but not all.
In the browse column 6 is field 9 (Char Type) , but the browse will take field 9 (num data) and put a '0' in the field, because he thinks it is a fieldnum field.
The code is using fieldget(n), but I think it should take the fieldname of the 6th colom ?
- Code: Select all Expand view
@ 450,870 XBROWSE oBrw4 SIZE 550,250 ;
PIXEL OF oWnd font oFont3;
DATASOURCE "MASTER";
COLUMNS "code","naam","fab_naam","fab_ref","pagina","picture" ;
HEADERS 'Code', 'Naam', 'Fabrik',"Ref.Lev","Pag","Foto";
COLSIZES 60,200,50,70,30,90 ;
CELL LINES NOBORDER
// Relevant Code
for n := 1 to Len( oBrw4:aCols )
WITH OBJECT oBrw4:aCols[ n ]
//msginfo(Fieldname( n )+ Fieldtype( n ) )
if FieldType( n ) != 'L'
:uBarGetVal := uValBlank( fieldGet( n ) )
if FieldType( n ) == 'N'
:cBarGetPic := NumPict( FieldLen( n ), FieldDec( n ) )
endif
endif
END
next
oBrw4:lGetBar := .t.
I also try to clear all the gets when I push the clear filter button. The button in the sample is
oBrw4:seek("") Will not work with this new get/filter system.
@ 410,1200 BTNBMP PROMPT "Clear Filter" ;
SIZE 100,40 PIXEL OF oWnd FLAT ;
ACTION ( oBrw4:cAlias )->( DBCLEARFILTER(), oBrw4:Refresh(), oBrw4:SetFocus() )