Jump to content
softtouch

TButtonEdit and left button dropdown menu

Recommended Posts

I have some buttonedit controls, each has left and right buttons.

The left buttons have all the same popup menu assigned as dropdownmenu.

When I now select a menuitem, how can I know which buttonedit control showed the popupmenu?

Share this post


Link to post

Not sure if it will work here but you can try to check the TPopupMenu.PopupComponent property.

Share this post


Link to post
1 minute ago, aehimself said:

Not sure if it will work here but you can try to check the TPopupMenu.PopupComponent property.

Unfortunately, it does not work with dropdown menus, it seems to work only with popup menus.

Share this post


Link to post

Isn’t the dropdown menu a TPopupMenu? Or you mean in this scenario the property is not populated?

Share this post


Link to post

Neviem, či máš na mysli toto:

     

It is in: procedure TAppearance.mniAlwaysStartOverClick(Sender: TObject);

Edited by Stano

Share this post


Link to post
35 minutes ago, aehimself said:

Isn’t the dropdown menu a TPopupMenu? Or you mean in this scenario the property is not populated?

The menu is a TPopupmenu, but assigned to the dropdownmenu property of the TButtonedit buttons. And with that, it seems not to work and TPopupmenu.popupcomponent return always nil.

  • Like 1

Share this post


Link to post
27 minutes ago, softtouch said:

And with that, it seems not to work and TPopupmenu.popupcomponent return always nil.

I see. Thank you for confirming.

Share this post


Link to post

This seems to be an oversight in TButtonedEdit (or rather TEditButton.Glyph) to set the DropDownMenu PopupComponent before calling its Popup method. Can you file a QP report similar to RSP-33837, please?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×