Different Header on Xbrowse

Post Reply
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Different Header on Xbrowse

Post 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?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Different Header on Xbrowse

Post 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
Regards

G. N. Rao.
Hyderabad, India
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Different Header on Xbrowse

Post 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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply