Re[2]: Right-click popup in ListView?
- Posted by aku saya <akusaya at gmx.net> May 13, 2003
- 355 views
Jonas & Derek: Thanks very much! It really works! Derek: I have tried using RightUp, but it is only triggered when I right-double-click, not right-click. Maybe a bug? J> If you want to stick to the Windows "standard" then popups should appear J> when the right mouse button is released, not when clicked. Derek shared J> this routine with me that works just fine: J> sequence pos, index J> id = getId( fetch( lParam, NMHDR_hwndFrom ) ) J> if id = FilesLV then J> pos = getPointerRelPos(Main) J> popup(FilesPM, pos[1], pos[2]) J> end if J> return {kReturnNow} J> end function J> void = setNotifyHandler( NM_RCLICK, routine_id("DoNM_RCLICK")) J> HTH, J> Jonas J> aku saya wrote: >> >> I want to make a right-click popup on a ListView >> (like in Windows Explorer). >> I tried onMouse event, detecting the RightDown event, >> but the list item is selected *after* the event, so when I used >> getIndex() to get the current item, it returns the previous selected >> item. >> >> What routine should I use? Using win32lib 58. >> >> Thanks! >> >> J> TOPICA - Start your own email discussion group. FREE!