Page 5 of 25
Posted: Sat Oct 07, 2006 3:34 pm
by Thorsten1867
srod wrote:How about using a column of checkboxes and those which are checked get deleted when the user hits the delete button etc?
I think it's easy to solve with egrid_CreateCellCallback().
srod wrote:If this is a big problem then I'll reinstate the original functionality, but then the emphasise is on the developer to hide the selection box whenever another control receives the focus.
It's better if it is possible to control it. Perhaps it would be a good idea to use a flag like '#egrid_AlwaysShowSelection'
Posted: Sat Oct 07, 2006 3:36 pm
by srod
Good idea, I'll get on it.
Posted: Sat Oct 07, 2006 3:38 pm
by srod
SUCCESS!!!
Have managed to 'persuade' Tailbite to produce a unicode version of egrid - which doesn't crash!!!
A bit more testing to do, but fingers crossed...
**EDIT: have been busy today! Shift/tab works as requested. Have added an extra flag #egrid_AlwaysShowSelection used when creating an egrid which works as requested by Thorsten1867 (above) and of course have managed to create a unicode version of the library.
I won't be able to upload until later though as I am away from my broadband connection at the moment.
@mskuma: I don't necessarily see a problem with using an egrid for large datasets. After all, an egrid is simply a ListIcon given an extra polish and a fresh coat of paint! If it does slow down too much, then consider using a standard header as opposed to a custom one. Also, go easy on other customisations perhaps.
I do intend allowing for 'virtual' egrids at a later date which should also help when using very large data sets etc.
Posted: Sun Oct 08, 2006 1:17 pm
by srod
**UPDATE: 8 October 2006.
A few ammendments (still at beta 2).
Have added 'shift/tab' functionality to tab in reverse through the grid etc. Have ammended the egrid_AddColumn() function so that a column index of -1 causes the new column to be appended etc. Have also added the creation flag #egrid_AlwaysShowSelection which prevents the selection box from vanishing whenever an egrid loses focus.
Most importantly, however, is the fact that the download now contains 3 versions of the library:
- an ANSI non-threadsafe version
- an ANSI threadsafe version
- a UNICODE non-threadsafe version (for testing purposes only at the moment).
If the unicode version proves to be stable then a 4th version will be forthcoming; a UNICODE threadsafe...
http://www.purecoder.net/egrid.htm
Posted: Sun Oct 08, 2006 1:19 pm
by Dare
Neat.
Thank you for following up on that!
Posted: Sun Oct 08, 2006 2:24 pm
by Thorsten1867
I've download the new version.
Now I get the error, that 'egrid_containerID()' is missing.
Posted: Sun Oct 08, 2006 2:38 pm
by srod
Thorsten1867 wrote:I've download the new version.
Now I get the error, that 'egrid_containerID()' is missing.
Thorsten, this function is no longer exported because with all the added commands, I could see no need for it. I can't think why you'd want the controlid of the container gadget?
Anyhow, here's a workaround:
Code: Select all
GetParent_(GadgetID(#egrid)) ;Handle of the container gadget.
Code: Select all
GetDlgCtrlID_(GetParent_(GadgetID(#egrid))) ;The controlid of the container gadget.
I hope this helps.
Posted: Sun Oct 08, 2006 3:13 pm
by Thorsten1867
Thanks! It works, but I don't understand, why it must be removed. With 'egrid_containerID()' it was possibel to use eGrid with other libaries (e.g. PV_Gadgets).
Posted: Sun Oct 08, 2006 3:26 pm
by srod
Ah yes I see. Sorry, forgot about that.
I can reinstate the command for the next version if you'd like. I must admit though that I'd rather keep it out as it encourages some 'dodgy dealings' where an egrid is concerned and if such code breaks the lib, then I cannot really be held to account!

Posted: Sun Oct 08, 2006 3:37 pm
by Dare
Did someone say "dodgy dealings"

I'm in!
Posted: Sun Oct 08, 2006 3:40 pm
by srod
Aye, there's always an aussie around when there's 'dodgy dealings' afoot!
hehe.
Posted: Sun Oct 08, 2006 3:43 pm
by Thorsten1867
I think all 'PureVisionXP'-User would be glad, if you add 'egrid_containerID()' again.
Posted: Sun Oct 08, 2006 3:55 pm
by srod
Ok, but it was never really documented anyhow. I think I made one mention of it in a much earlier version of egrid.
I will reinstate it. In the meantime, just create your own procedure named egrid_ContainerID() and using the above workaround etc.
Posted: Sun Oct 08, 2006 11:37 pm
by mskuma
Dare wrote:Thank you for following up on that!
Agreed. Thanks srod for keeping on top of it! I'm looking forward to trying it.
Posted: Mon Oct 09, 2006 12:28 am
by srod
You're welcome.
btw, I have fixed the gridline alignment problem - turned out to be easier than I thought!
The fix will only work if you use a custom header with an egrid as I have no control over the placement of the gridlines or the painting of a standard Windows header.
Will upload new versions tomorrow afternoon.
