Strange behavior with listivews and popups
- Posted by Jonas Temple <jtemple at yhti.net> Apr 04, 2003
- 385 views
I've noticed that when I use popup() from a listview a dotted rectangle (similar to what you would see in a drag/copy operation in a word processor) is showing up if an item is clicked in the popup. Has anyone seen this or know how to fix this? I've attached a small example: -- code generated by Win32Lib IDE v0.16.0 include Win32Lib.ew without warning -------------------------------------------------------------------------------- -- Window Window1 global constant Window1 = createEx( Window, "Window1", 0, Default, Default, 537, 401, 0, 0 ) global constant TestPM = createEx( Popup, "Test Popup", Window1, 0, 1, 0, 0, 0, 0 ) global constant TestPI = createEx( MenuItem, "Test Item", TestPM, 0, 2, 0, 0, 0, 0 ) global constant TestLV = createEx( ListView, {"Test"}, Window1, 16, 16, 460, 284, or_all({LVS_REPORT,LVS_SHOWSELALWAYS}), 0 ) atom lvMask integer lvOk lvMask = or_all({LVS_EX_FULLROWSELECT}) lvOk = sendMessage(TestLV,LVM_SETEXTENDEDLISTVIEWSTYLE,lvMask,lvMask) global constant OkayPB = createEx( PushButton, "Okay", Window1, 40, 316, 88, 28, 0, 0 ) --------------------------------------------------------- -------------------------------------------------------------------------------- procedure TestLV_onMouse (integer self, integer event, sequence params)--params is ( int event, int x, int y, int shift ) sequence pos -- Right mouse button down, show the popup if params[1] = WM_RBUTTONDOWN then pos = getPointerRelPos(Window1) popup(TestPM, pos[1], pos[2]) end if end procedure setHandler( TestLV, w32HMouse, routine_id("TestLV_onMouse")) -------------------------------------------------------------------------------- procedure OkayPB_onClick (integer self, integer event, sequence params)--params is () closeWindow(Window1) end procedure setHandler( OkayPB, w32HClick, routine_id("OkayPB_onClick")) WinMain( Window1,Normal )