Page 2 of 2

Re: BROWSE: problem with events key K_UP, K_DOWN ..

Posted: Mon Jan 09, 2017 5:35 pm
by srvet_claudio
I will check

Re: BROWSE: problem with events key K_UP, K_DOWN ..

Posted: Mon Jan 09, 2017 11:07 pm
by trmpluym
Hi Claudio,

I also developped a way to add a checkbox column to the browse control (to select records).
2017-01-09 23_58_36-Lijst facturen.png
2017-01-09 23_58_36-Lijst facturen.png (2.3 KiB) Viewed 5972 times
This requires a little (harmless) addition to de h_browse.prg (2 lines).
2017-01-09 23_53_46-h_browse.prg - SynWrite.png
2017-01-09 23_53_46-h_browse.prg - SynWrite.png (6.92 KiB) Viewed 5972 times
Maybe you can consider to add this small modification to the next release.
I can create a small demo for the HMG community (if there is interest) to demonstrate the checkbox column.

Theo

Re: BROWSE: problem with events key K_UP, K_DOWN ..

Posted: Tue Jan 10, 2017 8:54 am
by serge_girard
Great !

Thx, Serge

Re: BROWSE: problem with events key K_UP, K_DOWN ..

Posted: Tue Jan 10, 2017 2:27 pm
by EduardoLuis
Hi Trmpluym:

Excellent idea.-
As many users use browse control with dbf's, it will be a nice idea to put an small sample.-
Congratulatios for your discover and thanks for share with us.-
Regards
Eduardo

Re: BROWSE: problem with events key K_UP, K_DOWN ..

Posted: Tue Jan 10, 2017 4:14 pm
by srvet_claudio
trmpluym wrote: Mon Jan 09, 2017 11:07 pm Hi Claudio,

I also developped a way to add a checkbox column to the browse control (to select records).

2017-01-09 23_58_36-Lijst facturen.png

This requires a little (harmless) addition to de h_browse.prg (2 lines).

2017-01-09 23_53_46-h_browse.prg - SynWrite.png

Maybe you can consider to add this small modification to the next release.
I can create a small demo for the HMG community (if there is interest) to demonstrate the checkbox column.

Theo
Thanks !!!

Re: BROWSE: problem with events key K_UP, K_DOWN ..

Posted: Thu Jan 12, 2017 9:34 pm
by trmpluym
Here is the demo program with selection function in the browse control (see attachement).

2017-01-12 22_29_40-Selection of records Demo.png
2017-01-12 22_29_40-Selection of records Demo.png (10 KiB) Viewed 5894 times
Like posted earlier, to use the selection functionality the program requires a little (harmless) addition to de h_browse.prg HMG source code (2 lines).

2017-01-09 23_53_46-h_browse.prg - SynWrite.png
2017-01-09 23_53_46-h_browse.prg - SynWrite.png (6.92 KiB) Viewed 5894 times

Records can be selected and unselected by double clicking the checkboxes, using the menu or using the CTRL-F12 key combination. The key combination CTRL-F12 also moves the cursor to the next line, to make it easyer to select multiple records.

Enjoy :D

Theo

Re: BROWSE: problem with events key K_UP, K_DOWN ..

Posted: Fri Jan 13, 2017 4:16 am
by bpd2000
Nice extension
Thx for sharing

Re: BROWSE: problem with events key K_UP, K_DOWN ..

Posted: Fri Jan 13, 2017 12:46 pm
by mustafa
Hola amigos
Sobre checkbox publique hace tiempo este Sample por si les puede interesar
http://hmgforum.com/viewtopic.php?f=20& ... X&start=10
Saludos
*-------------------------- Google -----------------------------------*
Hello friends
About checkbox publish this Sample long ago in case you may be interested
Http://hmgforum.com/viewtopic.php?f=20& ... X&start=10
Thank you!
Mustafa

Re: BROWSE: problem with events key K_UP, K_DOWN ..

Posted: Fri Jan 13, 2017 12:47 pm
by bpd2000
mustafa wrote: Fri Jan 13, 2017 12:46 pm Hola amigos
Sobre checkbox publique hace tiempo este Sample por si les puede interesar
http://hmgforum.com/viewtopic.php?f=20& ... X&start=10
Saludos
*-------------------------- Google -----------------------------------*
Hello friends
About checkbox publish this Sample long ago in case you may be interested
Http://hmgforum.com/viewtopic.php?f=20& ... X&start=10
Thank you!
Mustafa
Nice, Thank you Mustafa

Re: BROWSE: problem with events key K_UP, K_DOWN ..

Posted: Sat Jan 14, 2017 10:53 am
by trmpluym
Hi Mustafa,

Thanks for your reply. Your solution works great for a grid in a single user environment.

I hope i do not offend you, but it does not work well in a multi-user environment.

In a multi-user program i am currently developing i was looking for a solution to select multiple records (for example to delete, print or copy the selected records).

A grid works very slow in combination with a DBF source in a multiuser environment ( see: http://www.hmgforum.com/viewtopic.php?f=5&t=5056 ).

But there is another problem when using your example in a multi user environment. The selection is stored in the DBF (the field STOCK->L ). When one user selects a record and the next user opens the application the same record is also selected.
This can be fixed easy using an array as a source for the selection (if you like a can post an example). But still the speed problem remains in a multi user environment.

So i created a solution for the faster working browse control when using a DBF. I could not find any checkbox selection example on the forum so i decided to write my own and share it over here.

But again i hope you do not take my post as an offend. The opposite is a fact, i discovered your checkbox grid solution in search for my problem before, and it was a very good learning experience !

Theo