Solved

Left Click Popup Menu

Posted on 1998-10-11
2
382 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
2 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 50 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi component that can load a DLL in design time? 8 64
Working this component WebCopy with proxy, help 3 84
Performance of SQL statement 37 112
update joined tables 2 47
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

821 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