Solved

How to showing SubMenu Using Button Press

Posted on 1998-07-02
3
266 Views
Last Modified: 2010-04-04
20 (Very Hard ...)

How to showing SubMenu Using Button Press
(not using right button on mouse, but using TButton on Form)
0
Comment
Question by:hrizal
[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
3 Comments
 
LVL 1

Accepted Solution

by:
michaue earned 20 total points
ID: 1356976
Use the TPopupMenu.Popup event under the TButton.Click event remeber to give the X and Y parameters for the positions (see delphi help for further questions)

Also se the TPopupMenu.AutoPopup property to False

Elfrieda :)
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1356977
Do you mean really the submenu, or the popup menu?

The popup menu appears when clicking right mouse button, submenu always appears when moving with mouse pointer of menu item.

Anyway here is popup example (see delphi help files):

Popup, AutoPopup Example

This example uses a pop-up menu. When the user presses the mouse button, the pop-up menu appears where the user clicked the mouse:

procedure TForm1.FormCreate(Sender: TObject);
begin
  PopupMenu1.AutoPopup := False;
end;

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

begin
  PopupMenu1.Popup(X, Y);
end;

Zif.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1356978
hehe, seems that i was a little bit late...
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

740 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