Re: treeview item events
- Posted by euman at bellsouth.net Aug 12, 2001
- 533 views
> ORIGINAL QUESTION: > I was looking in the archives for information on treeviews, but most of > it didn't make sense. I want to figure out how to trigger an event when > an treeview item gets a onMouse() event (or an equivalent). > Is this possible? I have no problems manipulating treeviews, maybe win32lib isnt up to the challenge... onMouse - Win32lib onEvent - Win32lib onClick - Win32lib WM_LBUTTONDOWN - API WM_RBUTTONDOWN - API WM_MOUSEMOVE - API WM_LBUTTONUP - API WM_RBUTTONUP - API and a few others, but because Im not a smart ass I wont include them as Derek provided us with half the damn SDK last message. I have a copy, thanks anyway Derek! therefore, onMouse = WM_LBUTTONDOWN but because of the notification message built into Treeview API, NM_CLICK must be the answer, eh! oh but wait, what about a mouse moveing over our treeview NMMOUSE and the point (pt) portion of the struct comes to mind here.. We wont go there unless Derek conceeds Win32lib cant do what API can... You see, Event driven libraries are in-efficient in speed, size and ability. Back to the ORIGINAL QUESTION: elsif iMsg = WM_NOTIFY then id = peek4s(lParam + NMHDR_hwndFrom) elsif id = TreeView then iMsg = peek4s(lParam + NMHDR_code) if iMsg = NM_CLICK then --Mouse click happened ontop of our treeview -- DO SOMETHING................ Well, Derek your wrong about sending messages to treeview. Are you saying that someone cant -on the fly- change charcteristics for a treeview?!?!?!? by sending a message to the controls parent. I think if you do this Derek that the treeview will respond which must mean that the treeview got a message hence my term to/from in the prior post. Derek, I think it's great that you try so hard to defend win32lib..... But most of us know the truth! BLOAT, "find your way around that freakin maze." SLOW, "try running an app on a 486, grab a cup of coffee and wait!" LIMITED, "to the imagination of the creator/s." EXTENDABILITY, "not for everyone, better off learning API." BUG CITY, "too many to mention." ETC..., ETC... Euman euman at bellsouth.net