1. Win32LIB V0.57.4 LV onClick
- Posted by Tony Steward <tony at locksdownunder.com> May 09, 2002
- 516 views
Hi all, Found my bug in listviews using old winlib and am now looking at new winlib and found that not many changes were needed at all but for somereason my program does not seem to respond/trigger the onClick routine with the new version. Any ideas why this might be? The changes that I found i had to make were not in this routine and would not be the cause. BTW I wish the docs for the LV procedures/functions in the new winlib were a little more detailed. Sorry for nit picking its a great programing tool and without it I probably wouldn't bother. Thanks Tony
2. Re: Win32LIB V0.57.4 LV onClick
- Posted by Derek Parnell <ddparnell at bigpond.com> May 10, 2002
- 476 views
----- Original Message ----- From: "Tony Steward" <tony at locksdownunder.com> To: "EUforum" <EUforum at topica.com> Subject: Win32LIB V0.57.4 LV onClick > > Hi all, > Found my bug in listviews using old winlib and am now looking at new > winlib and found that not many changes were needed at all but for > somereason my program does not seem to respond/trigger the onClick > routine with the new version. > > Any ideas why this might be? The changes that I found i had to make were > not in this routine and would not be the cause. I've done some checking with earlier versions of win32lib and none have ever supported an onClick event for ListViews. There is an onChange event, but never has been an onClick event. Am I understanding your problem correctly? I've coded a trap for the LVM_ITEMACTIVATE message but that only seems to fire for a double-click. The Click is usually detected by the library when a LeftDown and a LeftUp event occur in roughly the same screen location at roughly the same time. However, for ListViews, the LeftDown is detected but there is no matching LeftUp. I suspect that the ListView control traps it. If you really need one, I'll try to work out how to do it. > BTW I wish the docs for the LV procedures/functions in the new winlib > were a little more detailed. Sorry for nit picking its a great > programing tool and without it I probably wouldn't bother. Me too. I'm doing a little bit at a time. Please be patient with me. ----------- Derek.
3. Re: Win32LIB V0.57.4 LV onClick
- Posted by Derek Parnell <ddparnell at bigpond.com> May 10, 2002
- 485 views
Thanks Matt. Saved me the research effort. Much appreciated. ----- Original Message ----- From: "Matthew Lewis" <matthewwalkerlewis at YAHOO.COM> To: "EUforum" <EUforum at topica.com> Subject: RE: Win32LIB V0.57.4 LV onClick > > > > -----Original Message----- > > From: Matthew Lewis [mailto:matthewwalkerlewis at YAHOO.COM] > > > > Looks like listviews do send NM_CLICK notifications: > > In fact, looks like I posted this last year :) > > Date: 11 Jun 2001 > From: Matthew Lewis <matthewwalkerlewis at YAHOO.COM> > Subject: RE: weird listview behavior > > > And BTW, listview seems to not have the onClick event. I thought > > listview is like listbox except it has columns. Listbox has > > the onClick > > event; why not also listview? > > Listviews handle mouse events a little differently (apparently). You need > to add: > function fDoNM_CLICK(integer id, atom hWnd, atom wParam, atom lParam) > hWnd = fetch( lParam, NMHDR_hwndFrom ) > id = getId( hWnd ) > invokeHandler( id, w32HClick, {} ) > return {} > end function > > ...and make sure you also modify: > > constant kNotifications = > { > TCN_SELCHANGE > , LVN_COLUMNCLICK > , LVN_GETDISPINFO > , LVN_BEGINDRAG > , TVN_GETDISPINFO > , TVN_SELCHANGED > , TVN_DELETEITEM > , TTN_GETDISPINFO > , MCN_SELCHANGE > , TBN_GETBUTTONINFO > , TBN_QUERYINSERT > , TBN_QUERYDELETE > -- added NM_CLICK > , NM_CLICK > } > > constant kNotifyHandlers = > { > routine_id("fDoTCN_SELCHANGE") > , routine_id("fDoLVN_COLUMNCLICK") > , routine_id("fDoLVN_GETDISPINFO") > , routine_id("fDoLVN_BEGINDRAG") > , routine_id("fDoTVN_GETDISPINFO") > , routine_id("fDoTVN_SELCHANGED") > , routine_id("fDoTVN_DELETEITEM") > , routine_id("fDoTTN_GETDISPINFO") > , routine_id("fDoMCN_SELCHANGE") > , routine_id("fDoTBN_GETBUTTONINFO") > , routine_id("fDoTBN_QUERYINSERT") > , routine_id("fDoTBN_QUERYDELETE") > -- added fDoNM_CLICK Matt Lewis > , routine_id("fDoNM_CLICK") > > It doesn't look like NM_CLICK is defined in the latest version, but I don't > have the value handy at the moment... > > Matt Lewis > > > >