Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

Popup menu orientation

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
qas
Asked:
qas
  • 3
  • 2
1 Solution
 
Slick812Commented:
you  might try

popupMenu1.MenuAnimation  := maBottomToTop;

or set it in the object inspector.
0
 
qasAuthor Commented:
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
 
Eddie ShipmanAll-around developerCommented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
qasAuthor Commented:
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
 
Eddie ShipmanAll-around developerCommented:
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
 
qasAuthor Commented:
I just used the TrackPopupMenu API call in my code and it worked.  No need to inherit a component.

Thanks Eddie!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now