?
Solved

Popup menu orientation

Posted on 2003-02-27
6
Medium Priority
?
231 Views
Last Modified: 2010-05-18
Hi!

Is there any way I can force the vertical orientation of a popup menu ?  

For example, I want a menu to ALWAYS popup from bottom to top instead of top to bottom.  Even if the mouse isn't on the bottom of the screen.  

I hope to be clear enough.  If I ain't, please tell me and I'll supply examples.

Thanks!
0
Comment
Question by:qas
[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
  • 3
  • 2
6 Comments
 
LVL 34

Expert Comment

by:Slick812
ID: 8035856
you  might try

popupMenu1.MenuAnimation  := maBottomToTop;

or set it in the object inspector.
0
 

Author Comment

by:qas
ID: 8035898
Thanks Slick but it doesn't work.  

I use Delphi 4 and the component doesn't seem to have this property on the VCL version I use.
0
 
LVL 26

Accepted Solution

by:
EddieShipman earned 200 total points
ID: 8036372
Why, oh, why are you still using that outdated garbage Delphi4?

I don't have D4 installed so I can test it but you need to
inherit a new component from TPopupMenu and override the
Popup method...

var
  AFlags: Integer;
begin
  .
  .
  // Add this before the TrackPopupMenu call
  AFlags := AFlags or (3 shl 10);
  TrackPopupMenu(FItems.Handle, AFlags, X, Y, 0,
       PopupList.Window, nil);
end;
0
Technology Partners: 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!

 

Author Comment

by:qas
ID: 8037204
Hi EddieShipman.

I use that "outdated garbage Delphi4" because I don't have the couple of thousand dollars needed to switch to D7 (donators will be pleased to know that I accept VISA and MASTERCARD).  Still better than coding with notepad, though....

Thanks for the comment.  I'll try to build the component and give you the results as soon as it's done.

Thanks again!
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 8037238
I said garbage because D4 was so full of bugs that it was, literally, garbage. I would have stayed on D3 because D4 didn't add that much to warrant the bugs...

0
 

Author Comment

by:qas
ID: 8041489
I just used the TrackPopupMenu API call in my code and it worked.  No need to inherit a component.

Thanks Eddie!
0

Featured Post

Independent Software Vendors: 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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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 this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

764 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