Hiding Menu Items not working in 15.03
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
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
This discussion has been closed.
Comments
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.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Ouch! How did I miss that?