Home End User

Hiding Menu Items not working in 15.03

edited April 2014 in End User
The code to hide menu items as per
http://www.digital-metaphors.com:8080/index.php?title=End-User/Designer/How_To...Customize_Designer_Menu_and_Toolbars&highlight=menu
doesn't work for the "Load From File" & "Save To File" menus.

In the following code block the Print, Close and Help menus ARE hidden
but the File ones aren't:

if (lMenuBar is TppDesignerMenu) then
begin
lDesignerMenu := TppDesignerMenu(lMenuBar);
lDesignerMenu.FileMenu.Close.Visible := False;
lDesignerMenu.FileMenu.SaveToFile.Visible := False;
lDesignerMenu.FileMenu.LoadFromFile.Visible := False;
lDesignerMenu.FileMenu.Print.Visible := False;
lDesignerMenu.HelpMenu.visible := False;
end;

Thanks, Paul

Comments

  • edited April 2014
    Hi Paul,

    The SaveToFile and LoadFromFile options are dynamically added to the
    menu when the file menu is clicked and "SaveTo = stDatabase" is the
    default (defined in the Report.Template property). The easiest way to
    hide these options is to set the Designer.AllowSaveToFile property to false.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2014
    On 23/04/2014 16:43, Nico Cizik (Digital Metaphors) wrote:

    Ouch! How did I miss that? :)
This discussion has been closed.