Highlighted
Absent Member.
Absent Member.
684 views

[archive] Mouse Pointer position over List box

[Migrated content. Thread originally posted on 10 September 2009]

What I'm trying to do is to allow the user to right click the mouse to bring up a pop up menu when over a list box. However, doing a right click on the mouse does not select the record that you are currently pointing to, so the user would have to left click to select the record they want to process, then right click to bring up the list box pop up menu.

I have tried using the W$MOUSE call to get the mouse row value using the init-menu event and no matter which op code I use, it returns a value that matches the line location of the list box control that I use an inquire to get.

What I want to do is for when right clicking on the mouse with the pointer pointing at a record that hasn't been selected, some how select that record for the pop up menu processing.

Any ideas????
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Mouse Pointer position over List box

I have some grids that behave exactly the way you want. In fact I had to code it to stop this behavior for one grid because it was causing trouble 🙂 So I'm thinking that if you can switch your listbox to a grid it will probably work for you. I don't know why listboxes don't behave the same as a grid with respect to the left/right mouse buttons for selection... Seems to me they should.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Mouse Pointer position over List box

This has been raised many times before - it is very annoying but it is just not possible to do what you (and many of us) want with a list box and drop down menus.

As Mikalodeon, where it has been essential I have used GRIDS but of course they are more problematic than lists, and where lists are nice easy constructs to use - they do not process the right hand mouse click as we would wish.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.