HMG 3.3.1 Patch 2

This patch include:

– <ParentWindowName>.<GridControlName>.HeaderDYNAMICFONT ( nCol ) := {|| {cFontName, nFontSize, [ lBold,
lItalic, lUnderline, lStrikeOut ]} }
– <ParentWindowName>.<GridControlName>.HeaderDYNAMICFORECOLOR ( nCol ) := {|| aColor }
– <ParentWindowName>.<GridControlName>.HeaderDYNAMICBACKCOLOR ( nCol ) := {|| aColor } // implemented but not work ???

Demo :

#include "hmg.ch"

Function Main

 aItems := {}

 AADD (aItems, {"Carrot", 5, "A"})
 AADD (aItems, {"Cauliflower", 0, "B"})
 AADD (aItems, {"Corn", 15, "C"})
 AADD (aItems, {"Tomato", 0, "D"})
 AADD (aItems, {"Zucchini", 20, "E"})

 DEFINE WINDOW Form_1 ;
      AT 0,0 ;
      WIDTH 600 ;
      HEIGHT 400 ;
      MAIN 

      @ 10,10 GRID Grid_1 ;
        WIDTH 550 ;
        HEIGHT 330 ;
        HEADERS {'Product','Stock','Supplier'} ;
        WIDTHS {250,150,100};
        ITEMS aItems;
        EDIT;
        CELLNAVIGATION;
        COLUMNCONTROLS { NIL, {'TEXTBOX','NUMERIC'}, NIL }
 
     Form_1.Grid_1.ColumnJUSTIFY (2) := GRID_JTFY_RIGHT
     Form_1.Grid_1.ColumnJUSTIFY (3) := GRID_JTFY_CENTER

     aFont := ARRAY FONT "Calibri" SIZE 11 BOLD ITALIC
     Form_1.Grid_1.ColumnDYNAMICFONT (1) := {|| IF ( Form_1.Grid_1.CellEx(This.CellRowIndex,2) == 0, aFont,
                                            NIL) }
     Form_1.Grid_1.ColumnDYNAMICFONT (2) := {|| IF ( Form_1.Grid_1.CellEx(This.CellRowIndex,2) == 0, aFon
                                           , NIL) }


     // Dynamic Header
     Form_1.Grid_1.HeaderDYNAMICFONT (1) := {|| ARRAY FONT "Arial" SIZE 12 ITALIC UNDERLINE }
     Form_1.Grid_1.HeaderDYNAMICFONT (3) := {|| ARRAY FONT "Calibri" SIZE 12 BOLD }
 
     Form_1.Grid_1.HeaderDYNAMICFORECOLOR (1) := {|| HeaderForeColor() }
     Form_1.Grid_1.HeaderDYNAMICFORECOLOR (2) := {|| HeaderForeColor() }
     Form_1.Grid_1.HeaderDYNAMICFORECOLOR (3) := {|| HeaderForeColor() }

 END WINDOW

 CENTER WINDOW Form_1

 ACTIVATE WINDOW Form_1


 Return


Function HeaderForeColor
Local aColor
 IF This.CellColIndex == 1
    aColor := BLUE
 ELSEIF This.CellColIndex == 2
    aColor := RED
 ELSE
    aColor := NIL
 ENDIF
Return aColor



GoVisitBlue324x48
DL_PatchFrHMGForum312x48
DL_PatchFrGogDrive312x48

HMG 3.3.1 Patch 1

Main changes in this patch :

1) internal change in Dynamic Back and Fore Color in Grid (now is more efficient, was removed the use of an array with an element for each cell, avoid create a huge array).
2) New Dynamic Font in Grid and Tree controls

New features:

* GRID

– <ParentWindowName>.<GridControlName>.Image ( lTransparent ) := { “image1.png”, “image2.bmp”, … }
– <ParentWindowName>.<GridControlName>.ImageIndex ( nRow , nCol )
– <ParentWindowName>.<GridControlName>.ImageList
– <ParentWindowName>.<GridControlName>.DYNAMICFONT ( nCol ) := {|| {cFontName, nFontSize, [ lBold, lItalic, lUnderline, lStrikeOut ]} }
– <ParentWindowName>.<GridControlName>.HeaderImageIndex ( nCol ) [ := | –>] nIndex
– <ParentWindowName>.<GridControlName>.ChangeFontSize := nSize | NIL // Useful for use Dynamic Font with more (less) Height than the size of font the Grid/Tree control

// Dynamic Font (Grid/Tree)
ARRAY FONT <cFontName> SIZE <nFontSize> [ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ] –> { cFontName, nFontSize, lBold, lIitalic, lUnderline, lStrikeout }

// Dynamic Font (Grid/Tree)
CREATE ARRAY FONT <cFontName> SIZE <nFontSize> [ BOLD <lBold> ] [ ITALIC <lIitalic> ] [ UNDERLINE <lUnderline> ] [ STRIKEOUT <lStrikeout> ] –> { cFontName, nFontSize, lBold, lIitalic, lUnderline, lStrikeout }

* Tree Control

– ON EXPAND
– ON COLLAPSE

– This.TreeItemValue

– <ParentWindowName>.<TreeControlName>.DynamicForeColor := cBlock
– <ParentWindowName>.<TreeControlName>.DynamicBackColor := cBlock
– <ParentWindowName>.<TreeControlName>.DynamicFont := cBlock
– <ParentWindowName>.<TreeControlName>.ChangeFontSize := nSize | NIL // Useful for use Dynamic Font with more (less) Height than the size of font the Grid/Tree control

– <ParentWindowName>.<TreeControlName>.IsExpand ( nValue ) –> lBoolean
– <ParentWindowName>.<TreeControlName>.ImageList [ := | –> ] hImageList
– <ParentWindowName>.<TreeControlName>.HasLines [ := | –> ] lBoolean
– <ParentWindowName>.<TreeControlName>.FullRowSelect [ := | –> ] lBoolean
– <ParentWindowName>.<TreeControlName>.HasButton ( nValue ) [ := | –> ] lBoolean
– <ParentWindowName>.<TreeControlName>.Cargo ( nValue ) [ := | –> ] xData
– <ParentWindowName>.<TreeControlName>.CargoScan ( xData ) –> nValue | NIL
– <ParentWindowName>.<TreeControlName>.GetPathValue ( nValue ) –> anPathValue | NIL
– <ParentWindowName>.<TreeControlName>.GetPathName ( nValue ) –> acPathName | NIL
– <ParentWindowName>.<TreeControlName>.GetDisplayLevel ( nValue ) –> nDisplayColumn | NIL

GoVisitBlue324x48

DL_PatchFrHMGForum312x48

DL_PatchDemoFrHMG_Forum339x48

DL_PatchFrGogDrive312x48

 

HMG 3.3.1 (Stable) Patch 3

SELECT PRINTER <cPrinter> ;
...
[ PREVIEW ] ;
[ NOSAVEBUTTON ] ;
[ DIALOGFILENAME <DialogFileName> ] ;
[ SAVEAS <FullFileName> ]
- New DIALOGFILENAME [ cPath\ ] cFileName
- New SAVEAS [ cPath\ ] cFileName + cExt --> ".PDF" | ".BMP" | ".JPG" | ".GIF" | ".TIF" |".PNG" | ".EMF"
- New property ANGLE <nAngle> in PRINT DATA (nAngle: are in degrees and counterclockwise)

RichEdit Control: Fixed bug in Justify text and in ParaNumberingStyle constants (contrib by Kevin Carmody)

Grid Control : Fixed bug HeaderDymamicFont with HeaderImages

Note : this patch include previous two patches

GoVisitBlue324x48

DL_PatchFrHMGForum312x48

DL_PatchFrGogDrive312x48