Hello:
I would like to have a footer in xBrowse without column separations with the total number of records in the dbf that will be dynamically updated when records are added or deleted.
Please, how is this done?
Thank you very much.
#include "fivewin.ch"
REQUEST DBFCDX
function Main()
local oDlg, oBar, oBrw, oFont
SET DELETED ON
USE STATES NEW SHARED
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 400,500 PIXEL TRUEPIXEL FONT oFont
DEFINE BUTTONBAR oBar OF oDlg SIZE 80,32 2007
@ 52,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE "STATES" AUTOCOLS ;
CELL FOOTERS NOBORDER FASTEDIT
WITH OBJECT oBrw
:nEditTypes := EDIT_GET
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
:aCols[ 1 ]:bFooter := { || oBrw:nLen }
:aCols[ 2 ]:cFooter := "States"
//
:CreateFromCode()
END
// Add,Edit,Delete buttons and actions
DEFINE BUTTON OF oBar PROMPT "Add" CENTER ACTION oBrw:EditSource( .t. )
DEFINE BUTTON OF oBar PROMPT "Edit" CENTER ACTION oBrw:EditSource()
DEFINE BUTTON OF oBar PROMPT "Delete" CENTER ACTION oBrw:Delete()
DEFINE BUTTON OF oBar PROMPT "Close" CENTER ACTION oDlg:End() GROUP
//
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
#include "fivewin.ch"
REQUEST DBFCDX
function Main()
local oDlg, oBar, oBrw, oFont
SET DELETED ON
USE STATES NEW SHARED
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 400,500 PIXEL TRUEPIXEL FONT oFont
DEFINE BUTTONBAR oBar OF oDlg SIZE 80,32 2007
@ 52,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE "STATES" AUTOCOLS ;
CELL FOOTERS NOBORDER FASTEDIT
WITH OBJECT oBrw
:nEditTypes := EDIT_GET
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
//
:bRecSelHeader := { || "RecNo" } // OR { || "SlNo" }
:bRecSelData := { || oBrw:BookMark } // OR { || oBrw:KeyNo }
:bRecSelFooter := { || oBrw:nLen }
:nRecSelWidth := "999"
//
:CreateFromCode()
END
// Add,Edit,Delete buttons and actions
DEFINE BUTTON OF oBar PROMPT "Add" CENTER ACTION oBrw:EditSource( .t. )
DEFINE BUTTON OF oBar PROMPT "Edit" CENTER ACTION oBrw:EditSource()
DEFINE BUTTON OF oBar PROMPT "Delete" CENTER ACTION oBrw:Delete()
DEFINE BUTTON OF oBar PROMPT "Close" CENTER ACTION oDlg:End() GROUP
//
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 58 guests