Page 1 of 3

I had an epiphany (another boring story :)

Posted: Wed Apr 21, 2010 2:44 pm
by Roberto Lopez
Well....

I usually walk about one hour a day (by the sea) to try to keep my body (and my brain) in good shape...

I left my cell-phone at home, take my mp3 player and go to walk... then I can reach some 'peace of mind' state... :)

In such state, I can think about unsolved problems (real life and HMG :) )

A very old wish for HMG users (and to me too) is the possibility to freeze or lock grid columns to avoid scrolling when navigating.

Grid is based on Windows ListView control. ListView does not provide that functionality, so, Grid does not have it.

My conclusion about that, was that the task were very difficult and out of my 'abilities', so, the case was 'closed' until (at least) MS add column locking capabilities to ListView.

But yesterday, while doing my daily walking, an idea come to mi mind, appearing like a toast jumping from the toaster :)

Locking columns could be EXTREMELY EASY to do.

Later, at home, I've went to my computer and got the whole thing working in about 10 MINUTES!.

Here is the 3.0.30a patch.

It includes: 'libhmg.a', 'i_grid.ch', i_altsyntax.ch 'ide.exe' and new 'grid.38' sample.

I'm interested on that you test it and if you can figure out how it works and because was so easy to do :)

If no serious problems arise, this feature will be 'officially' added to 3.0.31 release.

Enjoy!

Re: I had an epiphany (another boring story :)

Posted: Wed Apr 21, 2010 3:51 pm
by esgici
Thanks a lot Roberto,

Your are working for us even in your relax time :)

Best regards

--

Esgici

Re: I had an epiphany (another boring story :)

Posted: Wed Apr 21, 2010 4:00 pm
by Algernon
Thanks Roberto, As esgici say you use your relax time to solve ours petitions.

In the patch 3.0.30a,rar I didn't find the file i_grid.ch and when I tried to compile the sample grid.38 it has a mistake, I think that I need i_grid.ch new version.

Regards and thanks again for your work.

Salu2

Re: I had an epiphany (another boring story :)

Posted: Wed Apr 21, 2010 4:10 pm
by Roberto Lopez
Algernon wrote:Thanks Roberto, As esgici say you use your relax time to solve ours petitions.

In the patch 3.0.30a,rar I didn't find the file i_grid.ch and when I tried to compile the sample grid.38 it has a mistake, I think that I need i_grid.ch new version.

Regards and thanks again for your work.

Salu2
Ok.

I've forgot the i_grid.ch and i_altsyntax.ch files.

I've added, re-packaged and uploaded again to the original message with the same name.

So, for the 4 persons that already downloaded, please, download again.

Sorry for the inconvenience.

Re: I had an epiphany (another boring story :)

Posted: Wed Apr 21, 2010 4:22 pm
by Algernon
That's fine, it's like a scroll, good work.

Thanks Roberto for all you do for us.

Re: I had an epiphany (another boring story :)

Posted: Wed Apr 21, 2010 4:38 pm
by esgici
Yes, everything is OK for me too :D

Tested, LOCKCOLUMNS with values other than 1 (even less than 1 and greater than column counts !), and applied some previous GRID samples; no problem seen :D

By the way, this was LOCK or FREEZE ? It seem to me in old days ( happy dBase and Clipper days ;) ) these was two separate process.

Now, we need waiting test results by Marek ;)

Best regards and hearty thanks Roberto :D

--

Esgici

Re: I had an epiphany (another boring story :)

Posted: Wed Apr 21, 2010 5:17 pm
by esgici
esgici wrote: ...
By the way, this was LOCK or FREEZE ? It seem to me in old days ( happy dBase and Clipper days ;) ) these was two separate process.
...
Sorry, I remember wrong :(

In Clipper I can't found LOCK, and description of FREEZE method of TBrowse class is :
Freeze (Assignable)

Contains a numeric value that defines the number of data columns
frozen on the left side of the display. Frozen columns are always
visible, even when other columns are panned off the display.

oTB:Freeze := 1
And, in dBASE side :
Lock and Freeze in Browse of dBase
Lock and Freeze in Browse of dBase
Lock&FreezeInDbase.jpg (75.65 KiB) Viewed 6493 times
Of course, this doesn't means "everything must be in this way", only a little remembering.

Saludos, regards

--
Esgici

Re: I had an epiphany (another boring story :)

Posted: Wed Apr 21, 2010 5:36 pm
by Rathinagiri
Great enhancement Roberto. Thanks a lot.

I can't figure out. :(

Re: I had an epiphany (another boring story :)

Posted: Wed Apr 21, 2010 5:43 pm
by fchirico
Roberto Lopez wrote:Well....

I'm interested on that you test it and if you can figure out how it works and because was so easy to do :)

Enjoy!
SPANISH:
Roberto:

Excelente!!!!

Lo estuve probando sin problemas.

Solo un comentario a nivel estético o de practicidad.

En el ejemplo si voy hasta la columna 6 y hago click en la columna 1 ( la que está LOCKEADA ) para editarla, al confirmar la edición con el ENTER y luego presiono la FLECHA IZQUIERDA para volver a la columna 6, debo apretar tantas veces la FLECHA IZQUIERDA como celdas tengo "ocultas", lo ideal sería que valla a la columna 6 de inmediato.

Esto es solo una cuestión de practicidad, me imagino en esos GRIDs enormes dándole a la FLECHA IZQUIERDA un sin fin de veces.

Gracias por esta posibilidad, es muy muy útil.

ENGLISH:
Roberto:

Excellent!!

What I was testing without problems.

Just a comment for aesthetic or practical level.

In the example if I go to column 6 and I click on the column 1 (which is locked) to edit, to confirm the issue with the ENTER and then press the LEFT ARROW to return to the column 6, I often press the LEFT ARROW as cells I have "hidden" ideally column 6 fence immediately.

This is just a matter of practicality, I guess in those huge GRIDs LEFT ARROW giving endless times.

Thank you for this opportunity, it is very helpful.

Re: I had an epiphany (another boring story :)

Posted: Wed Apr 21, 2010 6:25 pm
by fchirico
fchirico wrote:
Roberto Lopez wrote:Well....

.....En el ejemplo si voy hasta la columna 6 y hago click en la columna 1 ( la que está LOCKEADA ) para editarla, al confirmar la edición con el ENTER y luego presiono la FLECHA IZQUIERDA para volver a la columna 6, debo apretar tantas veces la FLECHA IZQUIERDA como celdas tengo "ocultas", lo ideal sería que valla a la columna 6 de inmediato........
Perdón, cuando dije FLECHA IZQUIERDA, quise decir FLECHA DERECHA.

Sorry, when I said LEFT ARROW, RIGHT ARROW meant.