NageswaraRao,
Its only three changes in the Class source code.
Could you show an example of your proposed change ? Thanks,
NageswaraRao,
Its only three changes in the Class source code.
Could you show an example of your proposed change ? Thanks,
This is a very useful addition to TXBrowse. Thanks to Mr Otto and Mr Antonio
/*
xbrfooter.prg
inhertited class to deal with footer codeblocks
if a few changes are made in the orginal
source, this is not necessary
*/
#include "FiveWin.ch"
#include "InKey.ch"
#include "xbrowse.ch"
#ifdef __XPP__
#define Super ::TControl
#define New _New
#endif
//-------------------------------------------------------------------------//
CLASS TXBRColFt FROM TXBrwColumn
DATA uFooter HIDDEN
METHOD cFooter SETGET
// FOR Comaptibilty with the recent change in FWH
// if the FWH code is reverted to previous code
// this bfooter method is not necessary
METHOD bFooter SETGET
ENDCLASS
//-------------------------------------------------------------------------//
METHOD cFooter( uNew ) CLASS TXBRColFt
LOCAL cFooter
IF PCOUNT() > 0
::uFooter := uNew
ENDIF
IF ::uFooter != NIL
cFooter := IIF( VALTYPE( ::uFooter ) == 'B', EVAL( ::uFooter ), ::uFooter )
IF VALTYPE( cFooter ) != 'C'
cFooter := TRANSFORM( cFooter, ::cEditPicture )
ENDIF
ENDIF
RETURN cFooter
//------------------------------------------------------------------------//
METHOD bFooter( uNew ) CLASS TXBRColFt
IF PCOUNT() > 0 .AND. VALTYPE( uNew ) == 'B'
::uFooter := uNew
ENDIF
// returning nil to avoid evaluation of the block in the paint method
// if the code in paint method is reverted to previous code
// old code : cFooter := ::cFooter <-- this is better
// then we can drop bFooter data and methods
// cfooter can be assigned a value or codeblock
RETURN NIL
//-----------#include "FiveWin.ch"
#include "InKey.ch"
#include "xbrowse.ch"
#ifdef __XPP__
#define Super ::TControl
#define New _New
#endif
//-------------------------------------------------------------------------//
CLASS TXBRColFont FROM TXBrwColumn
DATA uFont HIDDEN
METHOD oFont SETGET
ENDCLASS
//-------------------------------------------------------------------------//
METHOD oFont( uNew ) CLASS TXBRColFont
LOCAL ofnt
IF PCOUNT() > 0
::uFont := uNew
ENDIF
IF ::uFont != NIL
ofnt := IIF( VALTYPE( ::uFont ) == 'B', EVAL( ::uFont, Self ), ::uFont )
ENDIF
RETURN ofnt
//------------------------------------------------------------------------//NageswaraRao,
Though your proposed use of a SETGET method is a good and valid solution, it is quite different from the way that FWH uses the DATA oFont in other FWH classes, thats why we prefer to use it as we proposed
Anyhow, we thank you for your suggestions and comments