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?
#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
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 67 guests