1. [WIN] Win32Lib Combo *list* not respond to *right* click?
- Posted by Dan B Moyer <DANMOYER at PRODIGY.NET>
Nov 01, 2000
-
Last edited Nov 02, 2000
Matt, Derek, David, etc:
I've been trying to adapt Al Getz's method of using right-click to select an
item in a list, so that it could allow right click on a *Combo box's* list,
but it won't work. I'm wondering if maybe Win32Lib events don't *respond*
to right-click in Combo's *list* at all??
It that's true, maybe that capability could be added to an upcoming version
of Win32Lib? And, also if that's true, I suspect it's possible to add that
option to a program using the "general" event routine, but I don't know how.
Any help would be appreciated.
Dan Moyer
P.S.
Here's my variation of what Al sent me, to try to make right-click work in
combo box list; it demos that right-click only seems to work on the *edit*
box portion of the combo box, not on the *list* portion:
<code follows:>
constant CB_GETITEMHEIGHT = #0154,
CB_GETTOPINDEX = #015B -- 0x015b
----------------------------------------------------
procedure onMouse_EuRoutinesCombo(integer event, integer x, integer y,
integer shift)
atom index,bool,height,topindex,indexoffset
sequence itemtext
if event=RIGHT_DOWN then -- note: can use "RightDown", also
-- start of "housekeeping" to allow right click to work:
height=sendMessage(EuRoutinesCombo,CB_GETITEMHEIGHT,0,0)
topindex=sendMessage(EuRoutinesCombo,CB_GETTOPINDEX,0,0)
indexoffset=floor(y/height)
index=indexoffset+topindex
bool=sendMessage(EuRoutinesCombo,CB_SETCURSEL,index,0)
index +=1
-- NOTE: USE "index" TO REFERENCE TO ITEM SELECTED BY RIGHT CLICK
-- end of right click housekeeping
end if
end if
end procedure
2. Re: [WIN] Win32Lib Combo *list* not respond to *right* click?
Hi Dan,
as I'm about to send v0.54 off to sourceforge, I won't look into it now. If
somebody finds a way to do this though, I'll be happy to send a patch out
later.
-----
cheers,
Derek Parnell