Page 10 of 29
Re: HMG 3.3.1 (Stable)
Posted: Sat Sep 06, 2014 1:22 pm
by srvet_claudio
bpd2000 wrote:andyglezl wrote:Fantástico Dr. Soto, gracias por el ejemplo...ya puedo jugar un poco mas.
------------------------------------------------------------------------------------
Dr. Soto Fantastic, thanks for the example ... I can already play a bit more.
Suggestion:
On Pressing Function key F1..F5 Tree Expand, It Ok
But again Pressing same function key Collapses a Tree control
Very good idea and easy:
Code: Select all
ON KEY F1 OF Form_1 ACTION ( OnChangeTree( 2 ), Form_1.Tree_1.Value:= 2, IF (Form_1.Tree_1.IsExpand (Form_1.Tree_1.Value) , Form_1.Tree_1.Collapse (Form_1.Tree_1.Value), Form_1.Tree_1.Expand (Form_1.Tree_1.Value)))
Re: HMG 3.3.1 (Stable)
Posted: Sat Sep 06, 2014 3:05 pm
by bpd2000
srvet_claudio wrote:bpd2000 wrote: Suggestion: On Pressing Function key F1..F5 Tree Expand, It Ok
But again Pressing same function key Collapses a Tree control
Very good idea and easy:
Code: Select all
ON KEY F1 OF Form_1 ACTION ( OnChangeTree( 2 ), Form_1.Tree_1.Value:= 2, IF (Form_1.Tree_1.IsExpand (Form_1.Tree_1.Value) , Form_1.Tree_1.Collapse (Form_1.Tree_1.Value), Form_1.Tree_1.Expand (Form_1.Tree_1.Value)))
Thank you Dr. Claudio
Incorporated demo
Re: HMG 3.3.1 (Stable)
Posted: Sat Sep 06, 2014 5:56 pm
by andyglezl
Bueno, lo podemos simplificar un poco más...
---------------------------------------------------------
Well, we can simplify a little more ...
Code: Select all
ON KEY F1 OF Form_1 ACTION ONKFx( 2 )
ON KEY F2 OF Form_1 ACTION ONKFx( 5 )
ON KEY F3 OF Form_1 ACTION ONKFx( 8 )
ON KEY F4 OF Form_1 ACTION ONKFx( 12 )
ON KEY F5 OF Form_1 ACTION ONKFx( 22 )
*----------------------------------------------------
* ....
FUNCTION ONKFx( nElem )
OnChangeTree( nElem )
Form_1.Tree_1.Value:= nElem
IF Form_1.Tree_1.IsExpand( Form_1.Tree_1.Value )
Form_1.Tree_1.Collapse( Form_1.Tree_1.Value )
ELSE
Form_1.Tree_1.Expand( Form_1.Tree_1.Value )
ENDIF
RETURN nil
HMG 3.3.1 (Stable)
Posted: Sat Sep 06, 2014 6:23 pm
by Pablo César
@Claudio,
In
PCToledo forum asked me if there is a way o change font of a specific column header in GRID. They want Bold in columnheaderautoresizestyle. Is this be posible ?
I have read something:
here
Rgds
Re: HMG 3.3.1 (Stable)
Posted: Sat Sep 06, 2014 8:29 pm
by srvet_claudio
Pablo César wrote:@Claudio,
In
PCToledo forum asked me if there is a way o change font of a specific column header in GRID. They want Bold in columnheaderautoresizestyle. Is this be posible ?
I have read something:
here
Rgds
Pablo,
I think you can, I'll investigate the issue
Re: HMG 3.3.1 (Stable)
Posted: Sun Sep 07, 2014 8:05 pm
by srvet_claudio
Pablo César wrote:@Claudio,
In
PCToledo forum asked me if there is a way o change font of a specific column header in GRID. They want Bold in columnheaderautoresizestyle. Is this be posible ?
I have read something:
here
Rgds
Hi all,
this patch include:
Code: Select all
- <ParentWindowName>.<GridControlName>.HeaderDYNAMICFONT ( nCol ) := {|| {cFontName, nFontSize, [ lBold, lItalic, lUnderline, lStrikeOut ]} }
- <ParentWindowName>.<GridControlName>.HeaderDYNAMICFORECOLOR ( nCol ) := {|| aColor }
- <ParentWindowName>.<GridControlName>.HeaderDYNAMICBACKCOLOR ( nCol ) := {|| aColor } // implemented but not work ???
See demo:
Code: Select all
#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, aFont, 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
Re: HMG 3.3.1 (Stable)
Posted: Sun Sep 07, 2014 8:28 pm
by Javier Tovar
Gracias Dr. Claudio, una vez más me he quedado sorprendido!!!
Saludos
Re: HMG 3.3.1 (Stable)
Posted: Sun Sep 07, 2014 8:45 pm
by esgici
srvet_claudio wrote:
...
this patch ( 3.3.1\p2) include:
...
Gracias Dr.
Saludos cordiales
Re: HMG 3.3.1 (Stable)
Posted: Mon Sep 08, 2014 9:27 am
by bpd2000
srvet_claudio wrote:
...
this patch ( 3.3.1\p2) include:
...
Thank you
HMG 3.3.1 (Stable)
Posted: Mon Sep 08, 2014 12:10 pm
by Pablo César
srvet_claudio wrote:Hi all,
this patch include:
Code: Select all
- <ParentWindowName>.<GridControlName>.HeaderDYNAMICFONT ( nCol ) := {|| {cFontName, nFontSize, [ lBold, lItalic, lUnderline, lStrikeOut ]} }
- <ParentWindowName>.<GridControlName>.HeaderDYNAMICFORECOLOR ( nCol ) := {|| aColor }
- <ParentWindowName>.<GridControlName>.HeaderDYNAMICBACKCOLOR ( nCol ) := {|| aColor } // implemented but not work ???
Thanks Claudio, good ones !