Different Header on Xbrowse

Different Header on Xbrowse

Postby Silvio.Falconi » Tue Jul 07, 2020 6:10 pm

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?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Different Header on Xbrowse

Postby nageswaragunupudi » Wed Jul 08, 2020 1:09 am

Code: Select all  Expand view  RUN
#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
nageswaragunupudi
 
Posts: 10659
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Different Header on Xbrowse

Postby Silvio.Falconi » Wed Jul 08, 2020 2:00 pm

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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 67 guests