Solved

How to showing SubMenu Using Button Press

Posted on 1998-07-02
3
267 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

707 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