New FTDN March/Marzo 2009 (9.03)
Posted: Fri Mar 27, 2009 9:15 am
March 2009
==========
* Enhancement: Class TBrush has been improved to avoid the reuse of gradient brushes. Please
review samples\GradBrus.prg. Thanks to Günther!
* New: samples\WhereAmI.prg an interesting example to know on what procname, procline, control
and dialogbox we are located.
* New: samples\TestMMov.prg an interesting example to move a window, with the mouse, without a
caption.
* New: Class TImage Method LoadFromMemory(). It lets you load images directly from memory, without
having to create a temporary file. i.e.: oImg:LoadFromMemory( MyDBF->photo ), thanks to Cesar Lozada!
* Enhancement: FWPPC\UEStudio\Application config file has been updated for recent Harbour version.
Thanks to Richard!
* Enhancement: function uValBlank() has been enhanced to respect the length of numeric values when
turning them into zero. The previous behavior was affecting Class TDataBase Method Blank().
* New: Class TFolder Method SetItemText( nItem, cText ) lets you change the prompt (text) of a folder
tab without flickering. Thanks to Biel!
* Enhancement: Class TDataBase Method Delete(). Now it does not use DbFilter() at all.
* Fix: Class TGet Method Paste() keeps the previously GET :oGet:buffer length.
* Fix: Minor change in function cValToStr( uVal, cPic ) in source\function\valblank.prg
* New: Class TGet DATA lAdjustBtn, allows the adjustment of the button width to the bitmap width, when
... GET ... ACTION ... BITMAP ... is used. Please review samples\testget2.prg
* New: clause TRANSPARENT support for @ ..., ... SAY and some class enhancements to support it.
Please review samples\testsay.prg
* New: Some new DATAs for Class TBTNBMP to allow a fourth image that will be shown when the mouse is over the
the button. TBTNBMP commands have been enhanced to support this fourth image.
* New: TRANSPARENT clause support for Class TBTNBMP commands. It is no longer needed to do:
oBtnBmp:lTransparent := .T.
* Enhancements: Improved transparency support for Class TBTNBMP:
* It uses the same alignment and placement of the prompt and image, as the ones used for the 2007 clause
* ::cCaption is properly shown
* Four bitmaps support
* Image adjustment is supported
* New: clause TOOLTIP <cText> support in command @ ..., ... BTNBMP ...
* Enhancement: Class TBtnBmp properly shows the underline if "&" is used in the button prompt. Same behavior
as standard Windows buttons.
* New: Class TBtnBmp DATA lBoxSelect allows to show a border when the mouse is moved over the button, if clause
2007 is used.
* Enhancement: Class TBTNBMP properly manages clause ADJUST when the buttons are placed on a ButtonBar.
Please review samples\testbtb.prg. This example shows many of the new Class TBtnBmp enhancements.
* Enhancement: The cursor location in Class TGet goes to the very end of the GET when the GET is filled.
This feature has been requested for a long time. Please review sample\testget4.prg
Special thanks to Daniel García Gil for his great support and contributions!
* New: Class TBarTabs. It shows a bar with tabs. Please review samples\multibar.prg
XBROWSE:
* New: Two new EDIT_TYPE values for TXBROWSE cells: EDIT_DATE y EDIT_TIME, so DATEPICK and TIMEPICK are shown:
Please review samples\testdtp.prg
* New defines to access print and spreadsheet buttons of xbrowser
#define BUTTON_PRINT 1
#define BUTTON_SHEET 2
Please review samples\xbrwser.prg
* New: Class TXBrowse DATA nMoveType, to select the post-edition cells positioning:
#define MOVE_RIGHT 1
#define MOVE_LEFT 2
#define MOVE_UP 3
#define MOVE_DOWN 4
#define MOVE_NONE 5
#define MOVE_FAST_RIGHT 6
#define MOVE_FAST_LEFT 7
The ones with _FAST_ use FastEdit feature and is properly respected.
The other styles go to the selected cell without checking if such cell is editable.
Please review samples\xbposte.prg
* New: Class TXBrwColumn DATA lAutoSave to automatically save the edited cell value if other cell is clicked.
Please review samples\xbcell.prg
* New: Class TXBrwColumn DATA lBtnTransparent allows transparency for the buttons used on the cells.
Please review samples\xbrbtn.prg
* New: new EDIT_TYPE value for TXBROWSE cells: TYPE_IMAGE it is used for new DATA bStrImage
String data codeblock (returns a string with imagen name)
* Enhancements: To use empty array in xbrowse.
Please review samples\xbrarra1.prg
* Enhancements: To use nStretchCol == STRETCHCOL_LAST in xbrowse.
* Enhancements: Class TXbrowse METHODS ToExcel, ToCalc, Report and Eval:
When SET DELETED IS ON, these methods used to repeat the last column
as many times as there are deleted records. In case of DBFNTX, this
repetion is equal to number of filtered out records and deleted records.
Now this is fixed.
METHODS ToExcel() and ToCalc() default to each other:
When ToExcel() method is called and Excel is not installed, execution
defaults to ToCalc() automatically. When both Excel and Calc both are
not installed, then Alert is shown and export to spreadsheet is
abandoned.
Similarly a call to ToCalc method defaults to ToExcel method if Calc
software is not found.
Now software written with call to ToExcel or ToCalc work on any system
where either excel or calc are installed.
METHOD DelRePos
This method is called from Refresh method. This used to raise a
runtime error when DBF is SET FILTER TO an expression containing local
/ static varialbes. Now this method does not raise any error, though
does not reposition the invalid record in such cases.
DATAS lAutoAppend and bPastEof:
Change: In FastEdit mode, after editing the last column of last row,
new row is appended only if lAutoAppend is TRUE and bPastEof is
defined. If bPastEof is not defined, error mesage is not issued but no
automatic append takes place just like in previous versions.
If bPastEof is defined and lAutoAppend is FALSE, new row is added only
by pressing the down arrow key on the last row like in previous
versions.
New METHOD MakeTotals()
-----------------------
This method totals values of all columns whose DATA nTotal is set
to numeric. This can be used for accumulating totals to be
shown / refreshed in footers for any data source. Advisable to use
only for tables of small or medium size.
//----------------
#include "fivewin.ch"
#include "xbrowse.ch"
function Main()
xbrowser "\fwh\samples\customer" ;
columns "Last", "City", "Salary" ;
setup ;
( oBrw:lFooter := .t. ,;
oBrw:lFastEdit := .t. ,;
oBrw:Salary:lTotal := .t. ,;
oBrw:Salary:nTotal := 0 ,;
oBrw:Salary:nEditType := EDIT_GET ,;
oBrw:MakeTotals() ;
)
return nil
Salary column totals are set as footer and xbrowse automatic edit
behaviour updates the totals when salary column is edited.
//-------------
Function XBROWSE() and command XBROWSER.
1) Now xbrowse() / xbrowser command can be called with a dbf file name.
The function automatically opens the dbf with the default RDD and
closes when done.
Example:
Instead of :
USE \FWH\SAMPLES\CUSTOMER
XBROWER "CUSTOMER"
CUSTOMER->( DBUSEAREA() )
We can now write:
XBROWSER "\fwh\samples\customer"regards, saludos
2) Now XBrowse( oTree ) or XBROWSER oTree also works.
3) New CALC clause for the xbrowser command so Method ToCalc() is invoked to use "Oppen Office".
==========
* Enhancement: Class TBrush has been improved to avoid the reuse of gradient brushes. Please
review samples\GradBrus.prg. Thanks to Günther!
* New: samples\WhereAmI.prg an interesting example to know on what procname, procline, control
and dialogbox we are located.
* New: samples\TestMMov.prg an interesting example to move a window, with the mouse, without a
caption.
* New: Class TImage Method LoadFromMemory(). It lets you load images directly from memory, without
having to create a temporary file. i.e.: oImg:LoadFromMemory( MyDBF->photo ), thanks to Cesar Lozada!
* Enhancement: FWPPC\UEStudio\Application config file has been updated for recent Harbour version.
Thanks to Richard!
* Enhancement: function uValBlank() has been enhanced to respect the length of numeric values when
turning them into zero. The previous behavior was affecting Class TDataBase Method Blank().
* New: Class TFolder Method SetItemText( nItem, cText ) lets you change the prompt (text) of a folder
tab without flickering. Thanks to Biel!
* Enhancement: Class TDataBase Method Delete(). Now it does not use DbFilter() at all.
* Fix: Class TGet Method Paste() keeps the previously GET :oGet:buffer length.
* Fix: Minor change in function cValToStr( uVal, cPic ) in source\function\valblank.prg
* New: Class TGet DATA lAdjustBtn, allows the adjustment of the button width to the bitmap width, when
... GET ... ACTION ... BITMAP ... is used. Please review samples\testget2.prg
* New: clause TRANSPARENT support for @ ..., ... SAY and some class enhancements to support it.
Please review samples\testsay.prg
* New: Some new DATAs for Class TBTNBMP to allow a fourth image that will be shown when the mouse is over the
the button. TBTNBMP commands have been enhanced to support this fourth image.
* New: TRANSPARENT clause support for Class TBTNBMP commands. It is no longer needed to do:
oBtnBmp:lTransparent := .T.
* Enhancements: Improved transparency support for Class TBTNBMP:
* It uses the same alignment and placement of the prompt and image, as the ones used for the 2007 clause
* ::cCaption is properly shown
* Four bitmaps support
* Image adjustment is supported
* New: clause TOOLTIP <cText> support in command @ ..., ... BTNBMP ...
* Enhancement: Class TBtnBmp properly shows the underline if "&" is used in the button prompt. Same behavior
as standard Windows buttons.
* New: Class TBtnBmp DATA lBoxSelect allows to show a border when the mouse is moved over the button, if clause
2007 is used.
* Enhancement: Class TBTNBMP properly manages clause ADJUST when the buttons are placed on a ButtonBar.
Please review samples\testbtb.prg. This example shows many of the new Class TBtnBmp enhancements.
* Enhancement: The cursor location in Class TGet goes to the very end of the GET when the GET is filled.
This feature has been requested for a long time. Please review sample\testget4.prg
Special thanks to Daniel García Gil for his great support and contributions!
* New: Class TBarTabs. It shows a bar with tabs. Please review samples\multibar.prg
XBROWSE:
* New: Two new EDIT_TYPE values for TXBROWSE cells: EDIT_DATE y EDIT_TIME, so DATEPICK and TIMEPICK are shown:
Please review samples\testdtp.prg
* New defines to access print and spreadsheet buttons of xbrowser
#define BUTTON_PRINT 1
#define BUTTON_SHEET 2
Please review samples\xbrwser.prg
* New: Class TXBrowse DATA nMoveType, to select the post-edition cells positioning:
#define MOVE_RIGHT 1
#define MOVE_LEFT 2
#define MOVE_UP 3
#define MOVE_DOWN 4
#define MOVE_NONE 5
#define MOVE_FAST_RIGHT 6
#define MOVE_FAST_LEFT 7
The ones with _FAST_ use FastEdit feature and is properly respected.
The other styles go to the selected cell without checking if such cell is editable.
Please review samples\xbposte.prg
* New: Class TXBrwColumn DATA lAutoSave to automatically save the edited cell value if other cell is clicked.
Please review samples\xbcell.prg
* New: Class TXBrwColumn DATA lBtnTransparent allows transparency for the buttons used on the cells.
Please review samples\xbrbtn.prg
* New: new EDIT_TYPE value for TXBROWSE cells: TYPE_IMAGE it is used for new DATA bStrImage
String data codeblock (returns a string with imagen name)
* Enhancements: To use empty array in xbrowse.
Please review samples\xbrarra1.prg
* Enhancements: To use nStretchCol == STRETCHCOL_LAST in xbrowse.
* Enhancements: Class TXbrowse METHODS ToExcel, ToCalc, Report and Eval:
When SET DELETED IS ON, these methods used to repeat the last column
as many times as there are deleted records. In case of DBFNTX, this
repetion is equal to number of filtered out records and deleted records.
Now this is fixed.
METHODS ToExcel() and ToCalc() default to each other:
When ToExcel() method is called and Excel is not installed, execution
defaults to ToCalc() automatically. When both Excel and Calc both are
not installed, then Alert is shown and export to spreadsheet is
abandoned.
Similarly a call to ToCalc method defaults to ToExcel method if Calc
software is not found.
Now software written with call to ToExcel or ToCalc work on any system
where either excel or calc are installed.
METHOD DelRePos
This method is called from Refresh method. This used to raise a
runtime error when DBF is SET FILTER TO an expression containing local
/ static varialbes. Now this method does not raise any error, though
does not reposition the invalid record in such cases.
DATAS lAutoAppend and bPastEof:
Change: In FastEdit mode, after editing the last column of last row,
new row is appended only if lAutoAppend is TRUE and bPastEof is
defined. If bPastEof is not defined, error mesage is not issued but no
automatic append takes place just like in previous versions.
If bPastEof is defined and lAutoAppend is FALSE, new row is added only
by pressing the down arrow key on the last row like in previous
versions.
New METHOD MakeTotals()
-----------------------
This method totals values of all columns whose DATA nTotal is set
to numeric. This can be used for accumulating totals to be
shown / refreshed in footers for any data source. Advisable to use
only for tables of small or medium size.
//----------------
#include "fivewin.ch"
#include "xbrowse.ch"
function Main()
xbrowser "\fwh\samples\customer" ;
columns "Last", "City", "Salary" ;
setup ;
( oBrw:lFooter := .t. ,;
oBrw:lFastEdit := .t. ,;
oBrw:Salary:lTotal := .t. ,;
oBrw:Salary:nTotal := 0 ,;
oBrw:Salary:nEditType := EDIT_GET ,;
oBrw:MakeTotals() ;
)
return nil
Salary column totals are set as footer and xbrowse automatic edit
behaviour updates the totals when salary column is edited.
//-------------
Function XBROWSE() and command XBROWSER.
1) Now xbrowse() / xbrowser command can be called with a dbf file name.
The function automatically opens the dbf with the default RDD and
closes when done.
Example:
Instead of :
USE \FWH\SAMPLES\CUSTOMER
XBROWER "CUSTOMER"
CUSTOMER->( DBUSEAREA() )
We can now write:
XBROWSER "\fwh\samples\customer"regards, saludos
2) Now XBrowse( oTree ) or XBROWSER oTree also works.
3) New CALC clause for the xbrowser command so Method ToCalc() is invoked to use "Oppen Office".