Clique
aquipara fazer o download da versão de
Demonstracao do Fivewin. Para obter ajuda na
instalação e uso, veja o tutorial
que esta disponível em Artigos
* Fix: Class TBtnBmp Method Paint(), the bitmap and the text were not properly painted.
* Enhancement: Class TGet Method LButtonDown(), ::bLClicked now received three parameters when it gets evaluated: nRow, nCol, nFlags, Self. Same as in Class TWindow. Thanks to Frank Demont!
* Fix: Class TTitle DATA nAtImgPress was not properly initialized in Method New. Now it is ok.
* Fix: Class TXBrwose: In method ToExcel, Call to ToCalc method when excel is not installed is passing parameters wrongly in some circumstances. Now fixed.
* Enhancement: TXBrowse FastEdit: Now fast edit works even when Marquee Style is in now mode, if bClrRowFocus is assigned.
* TXBrowse new DATA bOnSwapCol: If assigned this code block is evaluated with BrowseObject, nFromCol, nToCol as paramters after columns are dragged with mouse.
* Fix: TXBrowse Freezed columns, When some columns are freezed, it was possible for the user to drag freezed columns out and viceversa with mouse drag. Now that is prevented. Now columns can be dragged within freezed columns or unfreezed columns. Freezed columns can not be dragged into unfreezed area and unfreezed columns can not be dragged into freezed area.
* Fix: TXBrowse Painting Footers: When XBrowse window style does not have WS_BORDER, the footer is painted 2 pixels above, leaving an unpainted space of 2 pixels below. This problem is experienced when Xbrowse is defined in resources without WS_BORDER.Fixed.
* Enhancement: TXBrowse Sorting columns: Now it is possible to toggle ascending and descending sort order even for Database Objects, if the database class implements method by name "OrdDescend" with the same syntax as the OrdDescend function of RDD.
* Fix: function RegOpenKey() was not properly working fine after recent changes. Now it is ok.
* Fix: Class TTitle, added missing call to Super:Destroy() from Method Destroy()
* Fix: Class TBtnBmp: PopUp menu attached to the first button of buttonbar is displayed at wrong coordinates when the windows are maximized. Fixed now.
* Enhancement: Class TBtnBmp: oPopUp data can be assigned with a codeblock which returns a PopupMenu object. This enables the button's popup menu to be dynamically changed at runtime.
* Fix: Class TBitmap Method ScrollRight(), minor fix when ::oVScroll is nil.
* Fix: XBrowse: Placement of footers was wrong when WS_BORDER style is not used. Now fixed.
* Fix: XBrowse: Fix in Calculation of stretched Column's width.
* Fix: XBrowse: Fixed incorrect dimensions of footer in the record selector area.
* Fix: XBrowse: Fixed (a) Wrong painting of header in the record selector area and (b) painting gray color instead of 2007 color right of the last column.
* Enhancement: XBrowse: If DATA lTransparent is set to .t., browse is painted transparently over the container window/dialog's like any other control. ( Works only for Browse created by code ). New clause TRANSPRARENT is added to XBROWSE command
* Enhancement: XBrowse: Now size of the Browse can be defined relative to the size of the container window / dialog. New DATAS nRightMargin and nBottomMargin can be assigned margin from Right and/or Bottom of the container Window/Dialog. When window is resized, browse also is resized keeping the right and bottom margins if assigned.
Margins, instead of absolute size can be defined while creating browse by speicifying zero or negative values for width and height values.
Example: @ 10,10 XBROWSE oBrw OF oDlg SIZE -10,-10 PIXEL .... sets the browse area leaving 10 pixels to the right and 10 pixels to the bottom.
* Enhancement: NOBORDER clause added to @ r,c XBROWSE command. By default XBrowse is created with WS_BORDER style. If NOBORDER clause is used, the browse is created without border. For browse created from resource this style is to be set in the resouce.
* New: Class TODBC Method IndexKey( cTable, nOrder ), returns the fields that are used from an index or a primary key. Thanks to Juan Navas!
* New: Class TODBC Method IsIndex( cTable, cIndex ), checks if an index exists for a given table. Thanks to Juan Navas!
* Enhancement: FWH own RibbonBar, example in FWHsamplesRibbon.prg, shows how to place a SAY alike control on alike RibbonBar Group.
* Fix: Class TCBrowse, there was an error with the kinetic scrolling implementation and the mouse upwards movement (draging with the mouse "hand"). Now it is ok.
* Fix: Class TTitle had a GDI memory leak in Method LoadBitmaps(). Now it is ok. Many thanks to Uwe for his feedback!
* Fix: Class TBitmap was using swapped ::nX and ::nY values when calling TransBmp(). Now it is ok.
* Fix: Class TBitmap was not properly painting in transparent mode if themes were used. Now it is ok.
* Fix: Class TRBtn Method SetFile() was not properly changing the bitmaps in the RibbonBar buttons, now it is ok. Please review FWHsamplesRibbon.prg to see how to easily implement a checkbox :-)
* Enhancement: includefwharb.h has been modified to make FWH work fine with the most recent CVS xHarbour.
* Fix: XBrowse: bDragBegin was not working after introduction of bToolTip for showing tooltips for individual cells. Now Fixed. When bDragBegin is assigned with codeblock, this takes precedence over cell tooltips and lKinetic setting. In other words, both cell tooltips and kinetic scrolling work if bDragBegin is nil.
* Enhancement: TXBrowse: When bPaintText is evaluated, the color pair being used is passed as array in the fifth parameter.
* Enhancement: SetMinMax() function in WndMove.C. SetMinMax function now resets only numeric values in the oWnd:aMinMaxInfo array. It is possible to specify only those values that need to be reset in the aMinMaxInfo array leaving other items as nil. For example, to set minimum size of window, oWnd:aMinMaxInfo can be assigned as { nil, nil, nil, nil, 400, 300, nil, nil }.
* Enhancement: function cWinVersion() properly detects Windows 7 and returns "7". Please review sampleswinver.prg
* New: function IsWin7(), returns a logical value lYesNo. Thanks to Ruediger!
* New: Added two sample programs xbrswap1.prg and xbrswap2.prg to demonstrate how to swap browses on the fly at runtime.
* Enhancement: FWHsamplesRibbon.prg has been improved to show top buttons above the RibbonBar tabs.
* Fix: BtnBmp: Transparent btnbmp paints correctly even if the brush or color of the container dialog is changed at runtime.
* Fix: Class TDialog Method End() was wrongly setting DATA hWnd to zero, so Method Destroy() was not getting properly processed. Now it is ok.
* Enhancement: Class TPop3 DATA lHeaderOnly allows to download just the headers of the emails and not the whole emails. Thanks to Anser!
* Fix: Class TXBrowse kinetic scrolling implementation was generating division by zero errors under some circumstances. Now it is ok.
October 2009 =============
* Enhancement: Class TXBrowse, Paste method can now be called without parameter ctext. When called without parameters, the paste method obtains the text from clipboards and continues with the paste operation. After pasting the text, totals are recomputed and footers updated.
* Fix: Class TXBrowse, when XBrowse() function or XBROWSER command is used in selection mode, some controls are not aligned properly. This is fixed now. Improved: Double click also selects.
* Enhancement: Class TXBrowse new CLASSDATA lKinetic to have kinetic scrolling or not. It is TRUE by default.
* Enhancements: Some minor changes and formatting on Class TCoverFlow. Removed DATA nPorcent, not used from the Class source code.
* Enhancement: Class TXBrowse, added new define value for TMySQL support defined in includexbrowse.ch
* Fix: Class TRadMenu Method nOption(), it only sets the new option value if it is different from the previous one. Thanks to Andy!
* New: Class TXBrowse with TMySQL support. Thanks to William Morales! Please review samplesmysql1.prg for a working demo.
* New: function DiagonalGradient(). Please review samplesdglgrad.prg
* Fix: Class TTrayIcon style WS_DISABLED restored. Thanks to Davide!
* Enhancement: Class TMGet Method Refresh() keeps the mouse caret at its previous location in the MGet text. Thanks to Peter!
* Fix: TFont class: Minor fixes in method Modify. Now methods Bold( lOnOff ) and Modify( nHeight ) work correctly.
* New: samplesExcel2.prg shows how to create a new excel book and add a new sheet and data to it, and finally save it as a file into disk.
* Enhancement: Class TXBrowse painting speed has been improved. Many thanks to William Morales!
September 2009 ==============
* New: Class TCoverFlow, provides a similar look to Apple coverflow look for your aplications, though without having to use OpenGL or other heavy external libraries. This Class is self contained and very light. Please review samplesTestCF1.prg for a working example. You may review its documentation from the FiveTech wiki:
* Enhancement: MENUITEM ... WHEN . The (codeblock) receives the oMenuItem as a parameter when it is evaluated.
* Enhancement: function ResizeBmp(), now accepts a 4th parameter (logical) to set MAXSTRETCHBLTMODE ( max resolution in resize ). You may review its documentation from the FiveTech wiki:
* Fix: Added missing .T. in calls to Method Set3DLook() from: control.prg, igroup.prg, radmenu.prg, rpreview.prg, say.prg, wbrowse.prg. Warning: FiveWin.ch has been modified also! Thanks to Luis Krause! :-)
* Enhancement: Class TControl Method MouseMove(), now tooltips are shown even if controls are in DESIGN mode (DATA lDrag := .T.).
* Fix: MDICHILD windows can use different icons. Now it is ok.
* New: function DBufferStart( hWnd, hDC ) --> aInfo. Part of the double buffer painting technique. Creates a memory DC as a temporary replacement for the actual DC of the window on which the painting takes place.
This function is to be used from functions, not from the Method Paint(). Please use FWDispBegin() from the Method Paint().
* New: function DBufferEnd( , ) –> nil. Part of the double buffer painting technique. Updates and reactivates the original DC of the window to be painted. This function is to be used from functions, not from the Method Paint(). Please use FWDispEnd() from the Method Paint().
* Enhancement: Class TRibbonBar new Methods KeyDown(), GoLeft() and GoRight().
* Enhancement: Added hb_storvds() support for xHarbour and older Harbour versions.
* Enhancement: Class TBtnBmp, fixed font support. Now we can define a font for the buttonbar buttons, i.e.: oButtonBar:SetFont( oFont ) or for each button:
DEFINE BUTTON OF oBar FONT oFont
* New: function SkinButtons(), it changes the look of all your standard windows buttons in your application. By default it uses the Office 2007 look colors. You can use your own defined colors using a TSkinButton object. Please review samplesTestSk1.prg
SkinButtons( [oSkinButton] ) --> [oOldSkinButton]
You may review its documentation from the FiveTech wiki: http://wiki.fivetechsoft.com/doku.php?id=fivewin_function_skinbuttons http://wiki.fivetechsoft.com/doku.php?id=fivewin_class_tskinbutton
* Fix: Bug solved in function DecToHex( nDecValue ) --> cHex
* Enhancement: FWH function GetNew() renamed as FWGetNew() to avoid conflicts with Harbour GetNew().
* Enhancement: FWH 9.09 is fully compatible with Harbour 2.0 and Microsoft VS2008 :-)
* Fix: ScreenToClient() and ClientToScreen() have been modified due to recent Harbour 2.0 compatibility issues. This fix solves the MouseWheel behavior on TXBrowse.
* New: samplesRibbon2.prg, RibbonBar and nonwait dialogs example, developed by Carlos Gallego
* Enhancement: Added functions OleInvoke(), OleSetProperty() and OleGetProperty() to keep backwards compatibility.
* Enhancement: code from Class TBtnBmp Method SysKeyDown() has been ported to Class TControl, so BtnBmp accelerators should work fine from any control. Please review samplesTestBtn3.prg
* Enhancement: function uCharToVal() in valblank.prg: (1) Corrected one syntax error that may result in runtime error under some circumstances. (2) Enhancement to deal with % sign in the input text. With this enhancement, values copied and pasted from excel containing values with % format are properly interpreted
* New: samplesTestTre5.prg, using a TreeView with checkboxes and checking their status.
* Enhancement: Added new functions for Windows GDI objects memory release control. Use SetResDebug() to activate the GDI objects recording and call CheckRes() to generate a checkres.txt log file. Please review sourcefunctioncheckres.prg
* Enhancement: samplesTestMMov.prg, minor fix for Windows XP support.
* New: samplesTestMov2.prg, shows how to paint a "floating" bitmap that can be moved around with the mouse.
* Enhancement: Improved RibbonBar groups and buttons painting.
* New: function CircleGradient() draws a circular gradient or returns a HBITMAP/HBRUSH with a circular gradient inside a rectangle. Please review samplesGradCirc.prg. Documentation:
* IMPORTANT: Harbour 1.x users need to include #pragma BEGINDUMP ... ENDDUMP from sourcefunctionharbour.prg. This FWH 9.08 should be used with Harbour 2.0 beta 2, or xHarbour. Harbour 2.0 beta 2 available from www.fivetechsoft.com/files/harbour.exe
* New: Kinetic Scroll support for browses in FiveWin! Similar behavior to the iPhone lists: grab and move the browses, and make them run! :-) Please review sampleskineticw.prg for WBrowse and sampleskineticx.prg for XBrowse.
* New: Blur function to create very nice display effects, similar to Windows 7 on the captions. Please review samplesTestBlur.prg and TestBlu2.prg
* Enhancements: Class TRibbonBar modified Method AddTab, we can dynamically add tabs to the ribbonbar now. New DATA ::aClrTabTxt, used to set text color on text tabs, data type numeric or codeblock. Replaced DATA nSeparation with method setget, we can dinamically change tab separation now.
* Fix: Class TRBtn tooltip support. Toobar buttons now support tooltips.
* Fix: Class TTitle text color support. Images are centered if no prompt text is used for them.
* Enhancement: Class TTitle images support an ACTION now: @ , TITLEIMG ... OF oTitle ACTION ...
* Fix: Class TButtonBmp fix in call to ABPaint(). Thanks to Ale!
* Enhancement: Class TRGroup Method Check(), improved support for creating reports using recordsets. Thanks to James!
* Fix: Class TActiveX Method SetProp(). Thanks to Lautaro!
* Fix: Minor fix in FiveWin.ch in REDEFINE BTNTBMP command. Thanks to Manuel Mercado!
* IMPORTANT: We have properly adapted FWH to use Harbour 2.0. We also support previous Harbour versions but adding some C code located in FWHsourceharbour.prg to your main PRG file. FWH is also fully compatible with xHarbour.
* New: Extend system compatibility layer for xHarbour and previous Harbour versions with current Harbour SVN version.
* Enhancement: All #defines _par... _stor... and _ret in includefwharb.h have been removed.
* Enhancement: All _ret calls in C files have been changed into Harbour hb_ret... calls.
* Enhancement: All _par... and _stor... calls in C files have been changed into Harbour hb_par... and hb_stor... calls.
* Enhancement: All CLIPPER declarations in C files have been changed into Harbour HB_FUNC().
* Enhancement: Class TRibbon Method Destroy() should not return zero (or Windows default behavior is not invoked).
* Enhancement: WINAPI function PrintWindow() is linked dynamically, so now user32.lib is NO longer required to be linked to build applications.
* Enhancement: samplesuildh.bat and buildx.bat have been modified to work with ... FWH LIBs path.
* Enhancement: Class TXBrowse Method SetRdd(), when autosort is specified, when no index tag with the same name of the field is not found, appropriate tag based on the index expression corresponding to the field name is used as sort-order.
* Fix: Class TXBrowse Method ToCalc(). Removed CopyFromRecordSet() as it is not supported by OpenOffice.
* Enhancement: Class TRibbonBar has been modified to work with MDI too.
* Enhancement: Added missing local oControl to Class TBtnBmp.
* Enhancement: Class TRBtn, added tooltips support.
* Fix: Class TBtnBmp, function CreateRoundRectRgn() was called with wrong parameters.
* Enhancement: Class TBtnBmp now supports Accelerators keys.
* Fix: Minor bug fix in function uCharToVal in valblank.prg for recognizing logical values.
July 2009 =========
* New: FWH own Class TRibbonBar: Create Office 2007 style RibbonBars without having to use any external DLL, OCX or libraries! Also this new Classes are available too: Class TRBGroup, TRBtn, and TRPanel.
You can also use these new controls, as standalone controls. Please review samplesRibbon.prg for a working example. If you click on "Paste" button in this example, you will see how these new powerfull controls can be used as a standalone controls too.
* New: Class TTitle. A great looking Title Class for your applications. Please review samplesTestTitl.prg
* Enhancement: Class TActiveX Method OnEvent() now receives an extra pParams with the original pParams ( DISPPARAMS * pParams ) so you can directly manage the original VARIANTs parameters array that is supplied to the ActiveX event.
* XBROWSE a) Inherited classes from XBrowse: It may be necessary to have a modified behaviour of xbrowse for a specific browse or an application. In such cases it is desirable to create one or mroe child classes derived from TXBrowse and use them. It is now very easy to implement this globally or for specific browses.
[bPrev := ] SetXBrowse( { || ChildBrowse() } ). After this all xbrowse commands create and use this child class. command equivalent is : SET XBRROWSE TO ChildBrowse() [ SAVE PREVIOUS TO bPrevXbr ]
To use child class for a speicific browse : @ r, c, XBROWSE oBrw CLASS ChildBrowse() OF ownd .... can be used. It is possible to use different child classes or standard FWH txbrowse for different browses displayed at the same time.
If browse is created in Oops syntax, TXBrows():New(oWnd) may be used instead of TXBrowse():New( oWnd ).
Sample: xbrchild.prg demonstrates use of child browses and switching between child and parent classes as well as provides a template for creation of child xbrowse class.
b) DateTime Type: (i) Due to incosistant behaviour of hb_isDateTime() function of xHarbour between different versions, appropriate modifications are made to retain the same functionality irrespective of the version of xHarbour
(ii) Recent versions of Harbour provide DateTime data type ( ValType -> 'T' ). The version of Harbour provided with this build does not provide this. XBrowse and ValBlank.prg are modified to use the datetime variables depending on the version of Harbour used in the application.
(iii) New datatypes 'T' and '@' ( for datetime and timestamp ) provided in DBFCDX are now properly recoginised and handled depending on the version of harbour or xharbour used.
(iv) Similar modifications are made for ADT tables
(v) Time only values of datetime variables are properly recoginized and timepart only is shown.
c) MethodsToExcel and ToCalc: Additional paramter aCols is provided. If an array of column objects is provided, the export will be of that columns only and in that order.
d) PostEdit cursor movement in Fast Edit mode ( default ): (i) The intended behavior is that after editing a cell, the cursor should move to the next editble cell in the same row and if the edited cell is the last cell of the row, the cursor goes to the first editabel cell of the next row.
Editable cell means where the columns's nEditType is nonzero and bEditWhen is evaluated to true. In earlier versions the movement was not honoring the bEditWhen. Now the cursor is moved to the next cell where bEditWhen also evaluates to true. This change provides the truely intended behavior.
(ii) In the same manner, after the last editable cell of last row is edited, if bPastEof is assigned, this codeblock is evaluated and the cursor moves to the first editable cell of the newly created row.
If bPastEof specifically positions the cursor to any specific column, the cursor stays on that column only if the cell is editable. Otherwise cursor moves to the next right editable column.
e) While painting the column's data, binary data is automatically recognized and if the data is valid image data, image is paainted in the cell,
If the first paramters is ommitted, XBrowse provides internally created bitmaps. These bitmaps are alpha blended and appear bright on dark backgrounds and black on bright backgrounds automatically. Examples can be seen in Testxbr3.prg.
g) New Data: oBrw:lContastClr INIT .t.
In case of gradient and image backgrounds with varying brighness in different cells, text in each cell is painted in the programmer specified color, if that color provides adequate cotrast with background of that cell and otherwise painted in white on dark backgrounds and in black on bright backgrounds.
The logic is still in development and gives reasonable results in many cases. This behavior can be suppressed by setting the data oBrw:lContrastClr to .f.
(i) Improved: Support for specifying array of Gradient colors as uBack. In this case, uMode can be logical paramter ( .t. for vertical or .f. for horizontal orientation ) default being vertical or earlier setting.
Gradient colors be set with this function at any time during definition of xbrowse or at runtime dynamically. It is not necessary to specify gradient colors on init clause of dialog.
Similarly orientation can be changed dynamically at any time. As in the case of Image backgrounds, grandient also respects window resizing.
(ii) Fixed: Background image was not properly painted in case of dialogs created from resource, in stretch and fill modes. Now fixed.
(iii) Parameters:
uBack : cImageFile / cResource / hBmpHandle / oBrush / aGradient colors In case of brushes and bitmap handles, the objects are to be destroyed by the calling program at the end.
uMode : In case of gradient colors logical value and in other cases numeric value BCK_TILED (0), BCK_STRETCH (1), BCK_FILL (2) ( Default BCK_TILED or previous mode )
oBrw:SetBackGround() without parameters clears any background oBrw:SetBackGround( nil, uMode ) switches the mode for the existing background
Backgrounds can be easily specified while creating xbrowse ( windows / dialogs from source or resources ) with the new clauses provided in the COMMAND SYNTAX:
(a) ease of specifying gradient colors while creating xbrowse (b) switching the orientation at runtime ( horizontal / vertical ) (c) changing the colors of the gradient during runtime by selecting and substituting any of the three colors of the gradient, (d) changing the size of different colors during runtime (e) view the code of gradient array (f) Inline editing of the gradient array code to dynamically change the gradient (g) copy the gradient array code to clipboard that can be pasted and used in other applications (h) display of text dynamically in contast colors to ensure better visibility (i) display of FW builtin checkboxes that appear in contrast colors on backgrounds of different bightness. This small sample program, with its intutive user interface, can also be used as a simple three color gradient designer for use with xbrowses or other controls.
i) New Data: TXBrwColumn:bGetChange. If assigned, this codeblock is used as bChange codeblock of bEditGet while editing the cells where nEditType is EDIT_GET.
During editing the bEditGet, this codeblock is evaluated with frist three parameters nKey, nFlats, oGet in the same manner as the bChange block of Get and in additon receives the column object as the fourth parameter. The column object can be used to derive other information about oBrw, oBrw:ownd, etc.
* REPORT:
Enhancement: Now images can be printed inside the columns of the report object. It is also possible to print text over images.
If clause IMAGE is specified without the clause IMGDATA, the column data is treated as binary image data.
If clauses IMAGE IMGDATA are specified, imgdata is printed in the background and any text data in the column data is printed over the background
Height can be specified in equivalent number of data lines or in pixels as well as alpha level.
This functionality is still under development is not tested on different kinds of printers. Feedback if any is highly appreciated to improve the functionality.
* Enhancement: Bitmaps: Some bitmaps containing alpha channel in the bitmaps32x32 folder are not premultiplied. They are now converted and provided in the AlphaBmp folder for use.
June 2009 =========
* Fix: recent enhancements in Class TBtnBmp were not properly releasing GDI objects. Now it is ok.
* Enhancement: Class TBtnBmp enhanced painting, very similar to Office 2007 buttons look. Please review FWHsamplesTestBtn3.prg.
* Fix: Class TXBrowse was not properly releasing GDI objects. Now it is ok.
* New: function BmpToStr( hBitmap ) --> cBitmapAsString, this function allows to convert any bitmap into a string that you can save into a memo field, to SQL servers, to disk, etc. Example of use:
a. Now any image file ( jpg, png, etc. ) can be used to create a Brush. b. Brush can also be created from a bitmap handle by specifying the handle as the fifth parameter of TBrush():New() method. Command support for this is not provided.
* Enhancement: Class TRichEdit:
a. When more than one richedit control was used simultaneously, windows exception error used to occur after closing the application window.
b. Now this is fixed. Any number of richedit controls can be used simultaneously.
* Enhancement: function MemoEdit():
a. Memoedit is improved to handle richedit text also automatically.
* Enhancement: Class TWindow Method lValid(), added Self as parameter while evaluating bValid. This ensures that in all valid codeblocks, we can expect the control object as the first parameter. This is very convenient while writing valid functions. This does not break existing code, but useful for those who use it.
* Fix: Class TSay, SAY … TRANSPARENT were not working on a Window, if the application is Themed. Now it is ok.
* Enhancements: Class TXBrowse:
a. GDI resource leaks in previous versions of xBrowse are now prevented.
b. XBrowse can now browse almost all kinds of data ( collection objects). Simplest way of invoking browse of any data is by XBrowse( uData ) or XBROWSER uData.
c. Arrays:
i. Array Handling capacities are revamped. It is possible to browse blank arrays, single and multi dimensional arrays and ragged arrays.
ii. Different rows of ragged arrays can have either arrays of different sizes or any normal data-types. Individual array elements of any row can contain any data-type including nested arrays, record sets, data objects or hashes. Double click on a nested array ( or hash, object ) invokes xbrowse of that array / hash/ object.
iii. By default, xbrowse allocates columns for the maximum number of columns contained in any row. Data alignment is decided on the basis of the type of each array element. Different data-types in the same column in different rows are aligned appropriate to that value.
iv. Bug in SetCheck method for arrays is now fixed.
d. Hashes and Array of Hashes, Now browsing of hashes and array of hashes work both in Harbour and xHarbour
e. Trees constructed with LinkList class of FWH
f. Objects:
i. Any object, including a user created class, which contains the necessary navigational methods, viz., GoTop(), GoBottom(), Bof(), Eof(), Skip(), RecNo(), GoTo() and Skipper() can be browsed like a table. Examples are TDataBase, TTxtFile(), etc.
ii. TOleObject: At present only ADODB.RecordSet objects are supported. Double clicking on Child RecordSets ( type : adChapter ) invokes browse of the child.
iii. When any other kind of object is browsed, all Datas and their values are shown. By default, the values can be edited and if the values refer to any collection object, double clicking invokes xbrowse of that object. (This can be of use during development for inspection of object data).
Examples : XBrowse( oWnd ), XBrowse( oBrw ).
Can be tested while defining any object with code like oDlg:bRclicked := {|r,c,f,o| XBrowse( o ) }.
g. Image rendering
i. In the previous versions, if a column contains file name of a picture, the picture is read from the file and displayed inline, if oCol:nEditType is set to EDIT_IMAGE ( -1 ). However the programmer was required to set adequate width of the column and row height of the browse. If the size of image was larger, it used to overflow to other rows and columns.
ii. Inline Image rendering in columns is now revamped and improved.
Xbrowse automatically allocates adequate column width and row height ( not exceeding 1/10th of screen width and height ) on the basis of the image in the first row. The default dimensions can be overridden in the program.
While rendering, if the image size exceeds the column width and height, the image is resized to fit the column dimensions, keeping the proportions in tact.
Now the columns value need not be a file name but can also be an image buffer. Image buffer is directly rendered in the cell as image, without any disk operation. This suits browsing of tables containing image data in memo fields or blob columns.
If the columns value is either file name of image or image data, oCol:cDataType should be set to "F". This is the recommended method instead of assigning -1 to nEditType, though this is retained for backward compatibility. When datatype is set to "F", xbrowse first checks if the file exists and if so, it reads the file and renders the image. If it can not find the file, it tries to treat the value as image data and tries to render the image from the data. Otherwise the cell is left blank.
If the columns value is image data, oCol:cDataType may be set to "P". In this case, image data is directly rendered in the cell, without any disk access.
In case of browsing ADT tables, if the columns type is Image ( or "P" ) xbrowse automatically recognizes the value as image data and sets the data-type to "P", No coding is required from the programmer.
Exporting to Excel will export images also to the respective cells with proper dimensions based on the xbrowse cell dimensions.
h. Background Image for xbrowse:
oBrw:SetBackGround( ) was accepting only brush / bitmap / resource only and painting the background in tiled mode only. Data cBmpAdjBrush was provided to paint a stretched background from any image file. But the functionality was very limited. Now the SetBackGround method is revamped and improved to handle any type of image and different types of painting. Now the background works well both for dialogs and windows and compatible with resizing the windows.
New Syntax: oBrw:SetBackGround( , )
Second parameter indicates the background paint mode. 0 : Tiled mode : Paints the image in tiled mode. ( Default ) 1 : Stretch mode : Stretches the image to fill the entire data area ( does not maintain proportions of the image ) 2 : Fill mode: Stretches or compresses the image, keeping proportions intact, just enough to fill the entire data area.
oBrw:SetBackGround() with no parameters or both parameters set to NIL, cancels background painting oBrw:SetBackGround( uImage ) sets the new image as background, without changing the paint mode set earlier. oBrw:SetBackGround( nil, nPaintMode ) changes the paintmode of the image already set as background image.
i. Pasting and saving images from clipborad the Image type columns: It was possible to paste any data from the clipboard into xbrowse cells ( copy ranges from excel into group of xbrowse cells or any data into individual cells) if pasting is enabled by setting oBrw:lCanPaste := .t.. This feature was limited to data only. Now images can be pasted into Image type columns and saved, if oBrw:lCanPaste is .t. and the oCol:nEditType is 1 and the columns cDataType is 'P' The images in Wwonders.dbf in the samples folder are copied and pasted from the web directly into the dbf through xbrowse.
Export to Excel:
i. Export of memo field contents are now properly handled. Tabs are converted to spaces and CRLFs are coverted to line-feeds.
ii. At present, export to Excel is performed by copying blocks of rows and columns to clipboard and pasting into excel sheet. This method is faster but does not suit all situations and at times is language dependant.
iii. New data lExcelCellWise ( defaults to .f. ) is provided to change this behavior. If this data is set to .t., individual values row-wise and column-wise are assigned to corresponding cells in the excel sheet. This data can be set to .T., if the default method does not suit the needs. This method is also language independent. XBrowse automatically switches to this method while browsing arrays or the data contains images.
Report method now handles memo values properly.
Inline edit of multiline memo fields:
i. Up and down arrow keys do not exit the multiline edit, unlike in previous versions.
ii. Bug fixed: Earlier edit was not allowing adding more text and lines Now fixed.
Method oCol(cHeader): This method used to raise run-time error, when headers for some columns are not set to character value. Now this is fixed.
Improved Multiple row selection: Now multiple rows can be selected by Shift-Up and Shift-Down arrow keys also.
TXBrwColumn class:
i. Method SetCheck( aBmp, uEdit, aPrompts )
Bug while using setcheck method for arrays is fixed.
Second Paramter: uEdit
a. If this parameter is a codeblock, this is taken as bOnPostEdit block of the column and nEditType is set to 1. It may be noted that in most cases, this is not necessary because the default bOnPostEdit block provided by XBrowse works satisfactorily. This code block is necessary only while creating the column in full OOPs way or if a different behavior is desired.
b. Alternatively this can be a logical value. If set to True, the column?s nEditType is set to EDIT_GET.
c. If this parameter is numeric, nEditType is set to the value provided. Zero value does not permit edit and a non-zero value permits edit.
Third parameter; aPrompts. If provided, the prompts will be used to display in addition to the check bitmaps. Example: oCol:SetCheck( { "ON", "OFF" }, .t., { "Male", "Female" } )
ii. DATA bOnChange ( New ). Executed when the column?s data is changed with two parameters, (1) Column object and (2) pre-edit value. This code block can be used for any operations depending on change of value of a cell.
iii. DATA nDataLen: (New) Optionally length of data can be specified in number of characters. This may be easier than specifying the nWidth in pixels, which depends mostly on the font size and the device context. If specified, this value is used for specifying the column size in Report method also. While creating XBrowse with command syntax, if negative value is specified in COLSIZES clause, the value is taken as column size in number of characters otherwise in pixels.
* Enhancement: XBROWSER Command:
New clause FASTEDIT. If this clause is specified, the browse is set to fast-edit mode and all columns are made editable.