Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Left Click Popup Menu

Posted on 1998-10-11
2
Medium Priority
?
417 Views
Last Modified: 2010-04-03
I want to attach a popup menu to the LEFT click of a button.  This would seem to be a fairly straightforward thing, but since the popupmenu property of the button only attaches to RIGHT clicks, and calling the popup method of the menu requires X and Y in absolute screen coordinates (which you have to calculate by taking form position, button position, mouse position, etc, and then taking into accound border widths, scrollbars, etc, this is just too complicated!

can anyone suggest a SIMPLE way of doing this? (ie LEFT click on the button to trigger the popup)

Thanks

Ben
0
Comment
Question by:1750
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 150 total points
ID: 1342537
Ben,

Getting the screen coordinates is not as hard as you think. Look up ScreenToClient and ClientToScreen - one easy call gives you the coords you needs to pass to the popup call.

Hope this helps,

Raymond.
0
 

Author Comment

by:1750
ID: 1342538
Thanks, that will do nicely!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question