This is a wrapper class for the awesome ZeeGrid control. This control used to only be available commercially but it appears that the author, David Hillard, released it free of charge in 2015. See his website for documentation and downloads of the Dlls. I also have the Dlls on my GitHub repository for it.
This class is very much just a port of the class I recently posted for the Scintilla control. Since it is completely message based, these are easy to wrap into classes that use the message names as methods.
GitHub Repository - https://github.com/kczx3/AHK-ZeeGrid
There is an included sample as well. Here's a screenshot.
[v2] ZeeGrid class
-
- Posts: 934
- Joined: 30 Sep 2017, 03:59
- Location: Romania
- Contact:
Re: [v2] ZeeGrid class
This is utterly nice! Great work!
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
Re: [v2] ZeeGrid class
Hi kczx3, thanks for sharing.
Just say that with SendMessage, in addition to having a significantly worse performance than DllCall, you should be careful with the return value in 32-bit compilations when it can be negative. If you expect a negative value, you must use SendMessage(...)<<32>>32, as indicated in the documentation (making the performance even worse). I have seen that some messages return -1 to indicate an error.
Just say that with SendMessage, in addition to having a significantly worse performance than DllCall, you should be careful with the return value in 32-bit compilations when it can be negative. If you expect a negative value, you must use SendMessage(...)<<32>>32, as indicated in the documentation (making the performance even worse). I have seen that some messages return -1 to indicate an error.
Re: [v2] ZeeGrid class
You are on a roll man!
This reminds me a lot of the RaGrid control majkinetor wrapped way back in the day. I can't wait to dig into this one too!
This reminds me a lot of the RaGrid control majkinetor wrapped way back in the day. I can't wait to dig into this one too!
Re: [v2] ZeeGrid class
Hi there! Thank you for checking it out.
I've noticed that the control is actually much slower than the standard ListView when added many rows. The control doesn't provide any messages for scrolling but I think I could handle WM_VSCROLL and perform virtualization of the data.
Are you stating that if I use DllCall to invoke SendMessage that it will perform better and I will not have to perform the adjust on the return value?Flipeador wrote: ↑02 Apr 2019, 20:09Just say that with SendMessage, in addition to having a significantly worse performance than DllCall, you should be careful with the return value in 32-bit compilations when it can be negative. If you expect a negative value, you must use SendMessage(...)<<32>>32, as indicated in the documentation (making the performance even worse). I have seen that some messages return -1 to indicate an error.
I've noticed that the control is actually much slower than the standard ListView when added many rows. The control doesn't provide any messages for scrolling but I think I could handle WM_VSCROLL and perform virtualization of the data.
Re: [v2] ZeeGrid class
Exactly.kczx3 wrote:Are you stating that if I use DllCall to invoke SendMessage that it will perform better and I will not have to perform the adjust on the return value?
Code: Select all
DllCall("User32.dll\SendMessageW", "Ptr", this.grid.hwnd, "Ptr", msg, "Ptr", wParam, "Ptr", lParam, "Ptr")
Re: [v2] ZeeGrid class
wow. very nice. Thank you!
Re: [v2] ZeeGrid class
very nice looking control and good job on the library, thanks for sharing
any chance you're working on a v1 compatible version?
any chance you're working on a v1 compatible version?
EitherMouse - Multiple mice, individual settings . . . . www.EitherMouse.com . . . . forum . . . .
Re: [v2] ZeeGrid class
Fair enough... if I take your work and make a v1 compatible version, would you prefer I:>> any chance you're working on a v1 compatible version? <<
Negative. I strictly work in v2 for anything new. I never wish to go back to using GUIs the old way.
a) share it in this thread
b) share it in a new thread
c) keep it to myself
EitherMouse - Multiple mice, individual settings . . . . www.EitherMouse.com . . . . forum . . . .
Re: [v2] ZeeGrid class
I would recommend you make a new thread.
Re: [v2] ZeeGrid class
Another nice one kczx3, good job
Thanks for sharing, cheers.
Thanks for sharing, cheers.
Re: [v2] ZeeGrid class
@kczx3, I wonder if you might be able to help me with this error when running the example (Win7 64-bit, various AHK_2 versions:
I've tried it with 2.0 versions from a090 through a103. It won't run at all until a099, and the next few versions throw this error. Thanks!
The only change I made in the example was instead of to reflect where ZeeGrid.ahk is (i.e. in the script dir).
Thanks!
Regards,
burque505
Code: Select all
---------------------------
ZeeGrid_Sample.ahk
---------------------------
Error: No object to invoke.
Line#
114: Throw Exception(this.__class "::" key "
Unknown property!", -1)
115: }
117: Return this.ZeeGridBase[key]
118: }
003: {
003: Return ExitApp()
003: }
---> 003: main.OnEvent("close", () => ExitApp())
005: grid := new ZeeGrid(main, "w600 h400", "", A_PtrSize = 8 ? "ZeeGridx64.dll" : "ZeeGrid.dll")
006: grid.OnEvent(grid.ZGN_RIGHTCLICK, Func("onRightClick"))
008: grid.DimGrid(10)
009: grid.AllocateRows(100)
010: grid.ShowRowNumbers(true)
011: grid.EnableRowSizing(true)
012: grid.SetColumnHeaderHeight(25)
The current thread will exit.
---------------------------
OK
---------------------------
The only change I made in the example was
Code: Select all
#Include ZeeGrid.ahk
Code: Select all
#Include <ZeeGrid>
Thanks!
Regards,
burque505
Re: [v2] ZeeGrid class
Odd. And it does work if you leave it referencing a lib location?
Re: [v2] ZeeGrid class
I will try that, just a sec.
EDIT: Tried it with ZeeGrid.ahk in a LIB folder below the script dir (and a copy of the DLLs there for good measure), and also with a copy in the LIB folder in the AutoHotkey directory. Odd. I'm sure it's working for everyone else from the posts.
EDIT: And it works fine for me on a Win10 Pro machine using 2.0_a103. Thanks for the great script!
Regards,
burque505
EDIT: Tried it with ZeeGrid.ahk in a LIB folder below the script dir (and a copy of the DLLs there for good measure), and also with a copy in the LIB folder in the AutoHotkey directory. Odd. I'm sure it's working for everyone else from the posts.
EDIT: And it works fine for me on a Win10 Pro machine using 2.0_a103. Thanks for the great script!
Regards,
burque505
Re: [v2] ZeeGrid class
Thanks for this good thing.
Difficult to edit for AHK V1?
Difficult to edit for AHK V1?
Re: [v2] ZeeGrid class
Hi Is There A Way To Provide Corrections to V2? Does not work in recent versions.
Return to “Scripts and Functions (v2)”
Who is online
Users browsing this forum: burque505 and 17 guests