Different Header on Xbrowse
Posted: Tue Jul 07, 2020 6:10 pm
by Silvio.Falconi
i have an xbrowse and under a tab control.
Is it possible to display different fields in the xbrowse if the user selects a different tab?
is there a minimal example for how to build this different visualization?
Re: Different Header on Xbrowse
Posted: Wed Jul 08, 2020 1:09 am
by nageswaragunupudi
Code: Select all
#include "fivewin.ch"
REQUEST DBFCDX
function TestTabs()
local oDlg, oTabs, oBrw
local aCols := { { "FIRST", "CITY", "STATE" }, ;
{ "FIRST", "LAST", "SALARY" } }
USE CUSTOMER NEW SHARED VIA "DBFCDX"
DEFINE DIALOG oDlg SIZE 600,600 PIXEL TRUEPIXEL
@ 0,0 XBROWSE oBrw SIZE 0,-32 OF oDlg DATASOURCE "CUSTOMER" ;
AUTOCOLS FOOTERS CELL LINES NOBORDER
WITH OBJECT oBrw
:CreateFromCode()
END
@ 568,00 TABS oTabs SIZE 600,32 PIXEL OF oDlg ;
PROMPTS "ONE", "TWO" ;
ACTION ShowCols( oBrw, aCols[ nOption ] )
ACTIVATE DIALOG oDlg CENTERED ON INIT ShowCols( oBrw, aCols[ 1 ] )
return nil
function ShowCols( oBrw, aCols )
oBrw:lHides := .f.
oBrw:RearrangeCols( aCols )
AEval( oBrw:aCols, { |o| o:lHide := .t. }, Len( aCols ) + 1 )
oBrw:Refresh()
return nil
Re: Different Header on Xbrowse
Posted: Wed Jul 08, 2020 2:00 pm
by Silvio.Falconi
Ok thanks
but how i can insert for each column the side, picture, and other info?
I have this
aBrowse := { { "TA->TaTipo", "Tipo",, 40, },;
{ "TA->TaElemento","Elemento" ,, 40, },;
{ "TA->TaDescElem","Desc" ,, 80, },;
{ "TA->TaServizio","Servizio" ,, 40, },;
{ "TA->TaDescServ","Desc" ,, 80, },;
{ "TA->TaSettore","Settore" ,, 40, },;
{ "TA->TaGiorni","N°Giorni" ,, 80, },;
{ "TA->TaCosto","Costo" ,, 80, },;
{ "TA->TaSconto","Sconto" ,, 80, },;
{ "TA->TaTotale","Totale" ,, 80, },;
{ "TA->TaTariffa","Tipo Tar." ,, 80, } }
of which the columns 1, 2, 4 are images
on first visualization I wish have 1,2,3, 6, 7, 8, 9, 10, 11 on second 1, 4,5,6,7,8,9,10,11