HMG 3.3.1 (Stable)

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.3.1 (Stable)

Post 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)))
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HMG 3.3.1 (Stable)

Post 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
Attachments
DemoTreeDy2.rar
(1.42 KiB) Downloaded 316 times
BPD
Convert Dream into Reality through HMG
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: HMG 3.3.1 (Stable)

Post 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

Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG 3.3.1 (Stable)

Post 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
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.3.1 (Stable)

Post 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
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.3.1 (Stable)

Post 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
Attachments
HMG.3.3.1_patch2.rar
(794.44 KiB) Downloaded 554 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: HMG 3.3.1 (Stable)

Post by Javier Tovar »

Gracias Dr. Claudio, una vez más me he quedado sorprendido!!! :o :o :o

Saludos
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG 3.3.1 (Stable)

Post by esgici »

srvet_claudio wrote: ...
this patch ( 3.3.1\p2) include:
...
Gracias Dr. :arrow:

Saludos cordiales :)
Viva INTERNATIONAL HMG :D
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HMG 3.3.1 (Stable)

Post by bpd2000 »

srvet_claudio wrote: ...
this patch ( 3.3.1\p2) include:
...
Thank you
BPD
Convert Dream into Reality through HMG
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG 3.3.1 (Stable)

Post 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 !
Attachments
Tela.PNG
Tela.PNG (11.74 KiB) Viewed 5480 times
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply