What am I missing here? FMX Anniversary edition.


What am I missing here? FMX Anniversary edition.

I placed a Popup menu on a TButton.

One of the TMenuItems in the Popup has a submenu TMenuItem.

When I run the application and right click on the button, the popup appears as it should. But then when I hover over the the TMenuItem that has a submenu, although the submenu appears, the TMenuItem's OnClick event is not generated.

Works in VCL, where I use this event to populate the submenu with, for example, recently opened files.

Downloadable sample: http://www.fieldtestedsystems.com/download/testpopu.zip


Comments

  1. Jeroen Wiert Pluimers So, if I understand right, you're saying that VCL <> FMX? :-)

    Actually, I wasn't sure if the missing functionality was a bug or design change. No matter. I'll can just use OnPopup and move on to other tasks. Thanks!

    ReplyDelete
  2. David Millington I'm not sure OnPopup is the right event for VCL. If my memory serves me well, VCL follows the Windows behaviour, and I think Windows behaviour is using the "OnClick" way. Note I'm not saying Windows is doing it right here (;

    ReplyDelete
  3. Jeroen Wiert Pluimers TBH, I can't remember how I've implemented this before. I think I filled all on-the-fly menu items when the menu was shown (ie OnPopup.)

    One reason not to, ie to do individual submenus individually, would be if there was significant cost to doing so and it would delay showing the menu. But that would cause a delay for the submenu anyway - UI behaviour that I've seen in apps and don't consider good.

    ReplyDelete

Post a Comment