+1
I'm having this same problem, but staratel20 did not explain it very well.
Summary:If you have a TPopupMenu with a TMenuItem (parent) with a
sub (child) TMenuItem, when you simply
hover on the parent TMenuItem:
Expected behaviour:
The Submenu Item should open.
Actual behaviour:
The Submenu Item opens,
AND it triggers the onClick event of the parent TMenuItem (if one exists) (if AutoCheck is false)
or toggles the 'checked' status of the parent TMenuItem (if AutoCheck is true)
Steps to reproduce (if AutoCheck is set to true):1. Create a TPopupMenu
2. Inside it: Create a Menu Item (parent)
Set Checked := true;
Set AutoCheck := true; (or see below if you set AutoCheck to false)
3. Inside that menu item: Create a **sub** Menu item (child) to the right.
4. Run the program, and **hover** over the parent menu.
Problem: It toggles the 'checked' status of the parent MenuItem.
Alternative (if AutoCheck set to false):1. Create a TPopupMenu
2. Inside it: Create a Menu Item (parent)
Set Checked := true;
Set AutoCheck := false;
3. Inside that menu item: Create a **sub** Menu item (child) to the right.
4. Create an **OnClick** event handler for the parent Menu Item:
procedure TForm1.MenuItem1Click(Sender: TObject);
begin
showmessage('Clicked!');
end;
5. Run the program, and **hover** over the parent menu.
Problem: It triggers the OnClick event.
I'm running Lazarus 2.0.6 on Windows 10.