DBSELECTAREA(cMName)
DBSETORDER ( cMName )
REDEFINE XBROWSE oBrw1 ID 110 OF oFld:aDialogs[ 1 ] AUTOSORT FASTEDIT ;
COLUMNS { "NACHNAME", "VORNAME", "KD_NR", "RTYP", "PFLSTUFE", ;
"KOST_RZH", "KOST_BEI", "KOST_PRI", ;
"KRK", "KRX", "LEER", ;
"PFK1", "PFX1", "PFK2", "PFX2", "PFK3", "PFX3", "PFK4", "PFX4", "PFK5", "PFX5", "LEER", ;
"B2K", "B2X", "PBK", "B1K", "B1X", "PBX", "LEER", ;
"VPK", "VPX", "PRA", "PRI", "BERG", "LEER", "SUMME", "PKT_SUMME", "LEER", "RECH_DATUM"} ;
ALIAS cMName UPDATE
I'm also interested in how you browse the changing month and day's (calender look) in the last browse.
This also in dynamic.
I'm interested in the code of building the Xbrowse, where you show the dates/months, depending on the active month of selected button.
How the headers are created
What is the best approach for this way of showing Xbrowses ?
#include "fivewin.ch"
REQUEST DBFCDX
function Main()
OpenData()
BrowseData()
return nil
function BrowseData()
local oDlg, oFont, oCbx, oBrw
local nMonth := 1
local aMonths[ 12 ]
local nOffSet
AEval( aMonths, { |c,i| aMonths[ i ] := NtoCMonth( i ) } )
nOffSet := MARCV->( FIELDPOS( "T1_1" ) ) - 4
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-15
DEFINE DIALOG oDlg SIZE 400,400 PIXEL TRUEPIXEL FONT oFont
@ 20,20 COMBOBOX oCbx VAR nMonth SIZE 200,400 PIXEL OF oDlg ;
ITEMS aMonths ON CHANGE oBrw:Refresh()
@ 60,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE "MARCV" ;
COLUMNS "ID", "Name", ;
{ || ( oBrw:cAlias )->( FieldGet( nMonth * 4 + nOffSet ) ) }, ;
{ || ( oBrw:cAlias )->( FieldGet( nMonth * 4 + nOffSet + 1 ) ) }, ;
{ || ( oBrw:cAlias )->( FieldGet( nMonth * 4 + nOffSet + 2 ) ) }, ;
{ || ( oBrw:cAlias )->( FieldGet( nMonth * 4 + nOffSet + 3 ) ) } ;
HEADERS nil, nil, "C1", "C2", "C3", "C4" ;
PICTURES nil, nil, "9999", "9999", "9999", "9999" ;
CELL LINES NOBORDER
WITH OBJECT oBrw
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
function OpenData()
CreateData()
USE MARCV NEW SHARED VIA "DBFCDX"
return nil
function CreateData()
local aCols := { { "ID", "+", 4, 0 }, { "NAME", "C", 6, 0 } }
local i, j, c, a
for i := 1 to 12
for j := 1 to 4
c := "T" + LTrim( Str( i ) ) + "_" + Str( j, 1 )
AAdd( aCols, { c, "N", 4, 0 } )
next
next
DBCREATE( "MARCV", aCols, "DBFCDX", .T., "DB" )
for i := 1 to 10
APPEND BLANK
FIELD->NAME := "Name" + StrZero( i, 2 )
for j := 3 to FCOUNT()
FieldPut( j, HB_RandomInt( 10,9999 ) )
next
next
CLOSE DATA
return nil
Maybe a better system in data structure of dbf/oRs?
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 46 guests