New FTDN January/Enero 2018 (FWH 18.01)

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

New FTDN January/Enero 2018 (FWH 18.01)

Post by Antonio Linares »

January 2018
============

* Enhancement: Class TDialog Method Command() has been enhanced for controls TEdit:

http://forums.fivetechsupport.com/viewt ... 51#p208451

many thanks to Antonino for his help!

* Fix: Class TXImage Method MouseMove() now properly shows the tooltip if defined:

http://forums.fivetechsupport.com/viewt ... 33#p208633


* EDIT control:
CUEBANNER clause added to EDIT control command.
Cuebanner text can be Ansi or Unicode text.

* GET:
- Cuebanner can be Unicode text also.
- It is now possible to specify any image of any size even when lAdjustBtn is .T.

* XBROWSE:
-------

- EditGet colors: TGet()'s colorfocus, if set, is taking
precedence over oCol:bClrEdit. Now bClrEdit, if specified,
takes precedence.

- EditGet is overlapping buttons in some cases of EDIT_GET_BUTTON
and EDIT_GET_LISTBOX. Fixed.

- Enhancement to method Copy( [lAllRows/aRows], [aCols] )
Param-1: Optional: .T. for copying all rows or Array of RecNos to be copied
Param-2: Optional: Array of Column Objects/col numbers/col headers

- New METHOD ToCSV( [cFile], [aCols], [lHeaders], [cTrue], [cFalse] )
--> cFile/cCsvText
1. cFile (Optional): If specified, CSV text is written to this file
and filename with full path is returned. Otherwise CSV text is
returned.
2. aCols (Optional): Defaults to all oBrw:VisibleCols(). If provided,
can be an array of column objects/ numbers/ headers/
3. lHeaders (Optional): Defaults to .T.. If .f., headers are not
written to the CSV
4. cTrue (Optional): Text to be written when the value is logical .t.
5. cFalse(Optional): Text to be written when the value is logical .f.

- bPastEof is now evaluated with 2 paramters Self, nKey.
Value of nkey is:
VK_DOWN : When triggered by pressing down key by the user.
0 : If ::GoDown() is called by the application program or triggered
by any event other than down key, when the table is Empty.
1 : After last column of last row is edited in FastEdit mode, if
::lAutoAppend is .T. (default)
nil : Any other case.
http://forums.fivetechsupport.com/viewt ... 57#p209757

- New Method ShowMessage( cMsg, [nSecs], [nClrText], [nClrBack] ) --> .f.
Displays a message for nSecs above the selected cell, without changing
focus. This can be used to display error messages in bEditValid block.
nSecs: Default 2 seconds
nClrText: Default CLR_WHITE
nClrBack: Can be a solid color, gradient array, alpha color or brush
object or handle. Default gradient {{1,CLR_BLACK,CLR_HRED},.f.}

* New function XBrowseXML( cXmlFile ) to browse any XML file.
This function uses TXmlDocument class of (x)Harbour and can display
only such xml files that can be read by this class.

* Enhancement: CLASS TScintilla METHOD MnuMargen(), added clause COLORS
to the popup menu definition: MENU oMnu POPUP COLORS

* Fix: function WndCenter() was not properly working for a window contained
inside a parent window. Now it is ok.

* TGET.prg: Painting of right/center aligned text is not uniform between
enabled and disabled gets. Now fixed.
http://forums.fivetechsupport.com/viewt ... =3&t=35167

* BTNBMP:
- In case of buttons defined with flat style and noborder clause,
:lBorder is being reset to .T. internally during mouse move. Fixed

- If text color is specified as codeblock, this is evaluated with
lMouseOver and Self as parameters.

- If brushs is to be set for btnbmp created on a dialog, it was
required to be set On Init clause of Dialog. Now the brush can
be set after defining the button.

- New DATA oFontBold. If set and the prompt has two or more lines separated
by CRLF, the first line is drawn with the oFontBold

- Border is painited as roundbox in case of flatstyle even when :lRound
is set to .f. Fixed. DATA nClrBorder can now be a codeblock also.

- New sample w10btns.prg to demonstrate Windows 10 Setup screen buttons using
Btnbmp

* TIconGroup class (see igroup.prg and igroup.ch)

- Fix: Fixed runtime error when ::aIcons is empty.
http://forums.fivetechsupport.com/viewt ... =3&t=35180

- Fix: Fixed runtime error when the control has no vscroll and arrow keys
are pressed.

- Fix: The icons created are never released because method End() is never
executed. Fixed.

- Enhancement: Method Add( hIcon, cPrompt, bAction )
hIcon can be also ico file or resource.

- Enhancement: Method Modify( hIcon, cPrompt, bAction, nAt )
hIcon can be also ico file or resource. There is also no need to specify
both icon and prompt. Only the parameter(s) need to be changed can be
specified.

* CHECKRES:
- Creation and destruction of icons was not covered by checkres system.
Now included.

* TDataBase:
- Data encryption:
Last parameter cPassword is added to methods New(), Open() and Create().
If specified, password is set by calling DBINFO( DBI_PASSWORD, cPassword)
if and only if the DBF does not contain any memo fields. This is because
RDD does not support encryption when the DBF contain memo fields.
- When password is set, TDatabase class internally encrypts and decrypts
memo fields.

* Icons as bitmaps:
Icons also can be used, like any other images, in the place of bitmaps for
btnbmp, buttonbmp, xbrowse, etc. Icon files contain images of different
sizes eg. 16x16,32x32, etc. By default icons are read with size 32x32.
This default can be set globally by SetDefaultIconSize( w, h ). Setting
default of 0,0 results in reading the icons with the default size contained
in the icon file.
Default size can be overridden by the programmer in case of individual
icons by speicifying the size along with the name of ico file/resource like:
DEFINE BUTTON FILE "\fwh\icons\column.ico(16x16)"
DEFINE BUTTON RESOURCE "BOOKS(16x16)"
For good quality rendering size of one of the image contained in the
icon file may be chosen.

* FWMARIADB: RowSet class:

- Method ReQuery() enhancement:
After executing ReQuery() without changes in the SQL, previous sort order
and filters were restored but record pointer is moved to top. Now the
record pointer is positioned on the previous record with the same primary
key.

- Method ReSync() Fix:
Resync() was failing on some rare cases, where table contained joins,
fields with the same name exist in more than one table and the alias used
for base table is the same as the name of the table. Now fixed.

* Enhancement: FWH function MemoEdit() dialogbox is now reasizable and it shows
the bottom right gripper.

* Ehancement: XBROWSER command can now display image, binary, xml and text
files.
Eg: XBROWSER "test.jpg", XBROWSER "tutor.obj", XBROWSER "tutor01.prg", etc

* Enhancement: TBitmap class: Now TBitmap class can read any image file/resource,
webaddress, etc (bmp,ico,cur,png,jpg,tiff) without the need of freeimage.dll and more if
freeiamge.dll is available. In contrast, TImage class requires freeimage.dll.

* New Function LOG and Command ( Thanks to Xevi for inspiring me the idea )

- Function StartFWLog( nTop, nLeft, nHeight, nWidth, lDown, lLines, lCouple )
nTop, nLeft, nHeight, nWidth - Position window LOG
lDown - the first message that appears is the last one sent
lCouple - Message window does not appear in the taskbar ( default )
Start dialog for LOG messages. Not need initialize for use MsgLog, but recommended
If you do not use this function, dialog LOG always remains visible

- Function GetMsgLog()
Return object dialog MsgLog

- Function MsgLog( xValor, nRow, nCol, nHeight, nWidth )
Dialog for LOG messages

- Command FWINLOG ( look Fivewin.ch for definition )

Sample:
MsgLog( Seconds() )

or better use new command
FWINLOG Seconds(), nSeconds, Seconds() - nSeconds

* AdoFuncs.prg:
- function FW_AdoImportFromDBF()
Import of DBF into MSAccess by linking DBF to MSAccess is failing with some versions
and installations of Access Runtime. Hence this approach is dropped.

- Bug in some situations where multiple connections are opened. Now fixed.
See: http://forums.fivetechsupport.com/viewt ... on#p209561

- New: sample adoapnd.prg to demonstrate inline append in xbrowse of ado sources.

* READING AND DRAWING IMAGES:
Method oWnd:ReadImage( uSource, [aResize], [lGDIP := .f.] ) --> aImageInfo
Function FW_ReadImage( oWnd/hDC, uSource, [aResize], [lGDIP := .f.] )
--> aImageInfo
oWnd can be any window, dialog or control.
Releasing Image: PalBmpFree( aImageInfo )

aImageInfo format { pImage/hBitmap/hIcon/hCursor/hMeta, hPalette,
nWidth, nHeight, lHasAlpha, cSource, lResource )
uSource: Can be (a) any file on disk (b) internet address of an image,
(c) Resource Name, (d) FWShapes array, (e) utf8asc value of a symbol
in Segoe UI symbol/Segoe Assets fonts/Windings fonts or
(d) pImage/hBitmap/hIcon

Images BMP,ICO,PNG,GIF,JPG,TIF,EMF,WMF are read as images without
feeimage.dll. If the dll is in the exe path any other images recognized
by freeimage.dll also are read. In case of all other disk files,
associated exe icon is read.

aResize: { width. height }. Optional array for resizing the image
lGDIP: Optional. Set to .T. to read as GDIP Image.

* Drawing Images:
Method oWnd:DrawImage( uImage, [aRect], [lTransp := .t.], [nResizeMode],
[lnAlpha], [lGray], [cAlign], [aColorMap] ) --> nLastRow
function FW_DrawImage( oWnd/hDC, uImage, <other params same as above> )

oWnd can be any window, dialog or control. hDC can also be printer DC
Most FWH classes internally use these methods/functions for rendering
images. These methods/functions can also be directly used by application
program.

uImage: 1) Can be result of :ReadImage(), TBitmap() object
or directly (2) any image source described in function fw_readimage.
[aRect] : Defaults to Client rect of oWnd. Larger images are resized to fit
within aRect without changing aspect ratio, unless Stretch mode is
specified as resize mode.
[lTransp]: Defaults to .T.
[lnResizeMode] .T. or 1 : Stretch to fit aRect, ignoring aspect ratio.
3: Image is enlarged or reduced to fit inside the aRect, without
changing aspect ratio
nil: Smaller images are not enlarged but larger images are reduced to fit.
[lnAlpha] Can be .T. or .F. or can be a number from 0 to 255.
Default is .T. if the image has Alpha
[lGray] Default .f.
[cAlign]: Default Horizontal and vertical center.
Alignment can be specified by combination of characters T,B,L,R to denote
top, bottom, left and right. eg: TR denotes top-right
[aColorMap]: Optional 2-dimentional array used to subsitute existing colors in
the image with programmer specified colors.
Example:
{ { CLR_BLACK, CLR_HRED }, { CLR_BLUE, CLR_GREEN } }
Black and blue colors are substituted by red and green colors.
This option works well when the image contains solid colors.

* IMPORTANT:
It is noticed that recent versions of Harbour implemented a change in the manner
of reading array data from Ole sources. For more details, please see the posting
http://forums.fivetechsupport.com/viewt ... 03#p209803
New functions
RsGetRows( oRs ) --> aRows
xlRangeValue( oRange ) --> aValue
are created for this purpose as explained in the posting.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: New FTDN January/Enero 2018 (FWH 18.01)

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply