Page 5 of 10
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 1:39 pm
by Roberto Lopez
esgici wrote:Very interesting
in c:\hmg\source\h_init.prg :
_HMG_SYSDATA [ 37 ] -> _HMG_aControlBrushHandle
Regards
--
esgici
You like to find "things"
That table in 'h_init.prg' refers to array names in old HMG versions replaced by _HMG_SYSDATA array.
From a long long long... time ago, these old arrays were used for multiple purposes depending on the control type, despite its name.
I've leaved such reference there for users that coded based on HMG interals in old versions that could want to convert to new structure.
Regards,
Roberto.
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 3:07 pm
by esgici
Roberto Lopez wrote:
You like to find "things"
I haven't any intention as being "bug finder of the year"

.
I am working only for contribute as far as I can.
Meanwhile time to time I am boring you by writing false reports and more frequently talking about worthless "things".
I am very sorry for this. Anyway you are punished me by being silent.
False reports are result of my haste and certainly my faults. The second may be a few discussable. Because importance is always relative to the view point.
You are encourage us frequently to working on UCI. For this I must understand _HMG_SYSDATA, I think. Is this wrong ?
Now, if I ask:
_HMG_SYSDATA [ 60 ] -> Custom Event Procedures Array
...
_HMG_SYSDATA [ 62 ] -> Custom Event Procedures Array
Is this correct ?
do you will say again:
You like to find "things"
?
Regards
--
esgici
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 4:12 pm
by Roberto Lopez
esgici wrote:
Now, if I ask:
_HMG_SYSDATA [ 60 ] -> Custom Event Procedures Array
...
_HMG_SYSDATA [ 62 ] -> Custom Event Procedures Array
Is this correct ?
do you will say again:
You like to find "things"
esgici
No. I'll do a better thing. I'll let you o find the answer
Hint: Look at "h_windows.prg"
Regards,
Roberto.
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 4:30 pm
by esgici
Roberto Lopez wrote:
I'll do a better thing. I'll let you o find the answer
.
Well... agreed; this is better..
But no the best!
A last question for this topic : How we will find answer
[37] unless you said :
aJustify := _HMG_SYSDATA [ 37 ]
Is this possible by only looking at the source code ?
--
esgici
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 6:54 pm
by Roberto Lopez
esgici wrote:Roberto Lopez wrote:
I'll do a better thing. I'll let you o find the answer
.
Well... agreed; this is better..
But no the best!
A last question for this topic : How we will find answer
[37] unless you said :
aJustify := _HMG_SYSDATA [ 37 ]
Is this possible by only looking at the source code ?
--
esgici
I guess yes 
The line 300 in h_grid.prg says:
_HMG_SYSDATA [ 37 ] [k] := aJust
Being 'aJust' the justify array passed as parameter to _DefineGrid procedure.
For clarification on the prior topic arrond line 4493 in 'h_windows.prg' you'll find:
Code: Select all
*------------------------------------------------------------------------------*
Procedure InstallEventHandler ( cProcedure )
*------------------------------------------------------------------------------*
aadd ( _HMG_SYSDATA [ 60 ] , AllTrim ( Upper ( cProcedure ) ) )
Return
*------------------------------------------------------------------------------*
Procedure InstallPropertyHandler ( cPropertyName , cSetProcedure , cGetProcedure )
*------------------------------------------------------------------------------*
aadd ( _HMG_SYSDATA [ 61 ] , { AllTrim ( Upper ( cPropertyName ) ) , AllTrim ( Upper ( cSetProcedure ) ) , AllTrim ( Upper ( cGetProcedure ) ) } )
Return
*------------------------------------------------------------------------------*
Procedure InstallMethodHandler ( cEventName , cMethodProcedure )
*------------------------------------------------------------------------------*
aadd ( _HMG_SYSDATA [ 62 ] , { AllTrim ( Upper ( cEventName ) ) , AllTrim ( Upper ( cMethodProcedure ) ) } )
Return
So:
_HMG_SYSDATA [ 60 ] is the user events array,
_HMG_SYSDATA [ 61 ] is the user properties array
_HMG_SYSDATA [ 62 ] is the user methods array
But more important is that you don't need to know these 'numbers' since UCI hides for you.
You must not acces that array directly, but via the procedures InstallEventHandler, InstallPropertyHandle and InstallMethodHandler.
Regards,
Roberto.
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 7:06 pm
by esgici
Roberto Lopez wrote:
I guess yes
All right, understood.
So, result of looking is depend to eyes.
Thanks a lot.
--
esgici
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 7:21 pm
by esgici
Roberto Lopez wrote:
But more important is that you don't need to know these 'numbers' since UCI hides for you.
I am noticed, _HMG_SYSDATA is
registry of HMG, we must don't play with it.
Regards
--
esgici
Re: Grid2Print - Suggestions
Posted: Sun Aug 24, 2008 7:28 pm
by Roberto Lopez
esgici wrote:Roberto Lopez wrote:
But more important is that you don't need to know these 'numbers' since UCI hides for you.
I am noticed, _HMG_SYSDATA is
registry of HMG, we must don't play with it.
Regards
--
esgici
Ohh Yeah!... AT YOUR OWN RISK
Regards,
Roberto.
Re: Grid2Print - Suggestions
Posted: Mon Aug 25, 2008 3:14 am
by Rathinagiri
Whew! It is JUST Gr8.
Now I am working on the new version. Please wait.

Re: Grid2Print - Suggestions
Posted: Mon Aug 25, 2008 5:35 am
by Rathinagiri
Here comes the new version. It can be downloaded from
here.
Change Log:
1. No parameter is now required for the print method. Just call Form1.Grid1.Print(). Thanks a lot Roberto.
2. Wordwrap option is now available for longer text. For text columns, you can increase/decrease the column size (in mm) using the small button near the column selection table. (see the image) Select wordwrap option in Report Properties.
Please give your suggestions and bug reports. Thanks.