1. [Win32Lib] 57.11 ; setHandler, mouse_move, HOW?
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Oct 21, 2002
- 428 views
While trying to figure out for Tony how to save & re-create treeviews, in the demo tvedit.exw, I wanted to be able to move the mouse over a treeview item & be informed what its "index" was; but nothing I added to the existing handler for mouse events on the TV worked very well (most didn't work at all). What should I have done instead of all the things I tried? (see below) The initial handler was: procedure Mouse_TV(integer self, integer event, sequence parms) -------------------------------- integer index if parms[1] = WM_RBUTTONDOWN then popup(TVPopup, parms[2]-10, parms[3] ) end if end procedure I tried: procedure Mouse_TV(integer self, integer event, sequence parms) -------------------------------- integer index if parms[1] = WM_RBUTTONDOWN then popup(TVPopup, parms[2]-10, parms[3] ) elsif event = MOUSE_MOVE then setText(TVindexLabel, hitTestTV(TV)) end if end procedure which did nothing, and also changing event to parms[1] did nothing also. I also tried: procedure Mouse_TV(integer self, integer event, sequence parms) -------------------------------- integer index if parms[1] = WM_RBUTTONDOWN then popup(TVPopup, parms[2]-10, parms[3] ) end if if event = MOUSE_MOVE then setText(TVindexLabel, hitTestTV(TV)) end if end procedure which also did nothing. The only thing I could think of that did *anything* was: procedure Mouse_TV(integer self, integer event, sequence parms) -------------------------------- integer index if parms[1] = WM_RBUTTONDOWN then popup(TVPopup, parms[2]-10, parms[3] ) setText(TVindexLabel, hitTestTV(TV)) end if end procedure and that only works "weird", in that you have to (not unexpectedly) click right button on an item, and then left click on the item itself rather than anything in the popup menu. Dan Moyer (who is confused)