can't make TMenuItem invisible dynamically

Hi There,

I was trying to hide a TMenuItem from TWebMainMenu dynamically and however, I was not able to do so.

I have made a demo for the tests.
61. Hide menu.zip (1.6 MB)

In the demo project, if you click the button 'Hide menu 2' to hide or show the Menu2, Menu2 does not behave as expected.

Any ideas?

Thanks,

We could reproduce a problem and we applied a fix.
This fix will be in the next release.

Note that any changes to the menu items always need to be done by putting these into a BeginUpdate / EndUpdate block:

begin
  WebMainMenu1.BeginUpdate;
  Menu2.visible := not Menu2.visible;
  WebMainMenu1.EndUpdate;
end;
1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.