Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to showing SubMenu Using Button Press

Posted on 1998-07-02
3
Medium Priority
?
269 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 60 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

636 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