Do not allow user to [Save As] for TppDesigner
I do not want users to simply access other reports and override the report.
So I wish to implement in a way that do not allow the designer to use Save
As.. but only Save. Can I diable some of the menu options?? Also, if is
there a way to add new menu items to the menu bar??
TIA
So I wish to implement in a way that do not allow the designer to use Save
As.. but only Save. Can I diable some of the menu options?? Also, if is
there a way to add new menu items to the menu bar??
TIA
This discussion has been closed.
Comments
determine which tab you are in and can disable the proper menu item.
http://www.digital-metaphors.com/tips/HideSave.zip
You can add menu options by using the merge menu property. Here is an
example:
http://www.digital-metaphors.com/tips/MergeMenuWithDesigner.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
to disable the Open button in the component tab?? you know, those reside
inside the tabcontrol??
is disable the standard toolbar, both the menu option and the toolbar.
{disable standard toolbar}
ppDesigner1.Menu.Items[2].Items[0].Items[0].Visible := False;
TppDesignerWindow(ppDesigner1.Form).ToolBarManager.RemoveToolbar('StandardTo
olBar');
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
from the user on the menu side, but what about the toolbar?? I mean, you can
bring the standard toolbar out and the user can save the report using that
function.That's why I brought up the issue about the toolbar thing. It is
not only Save As... I do not want to allow my users to access, but also the
Open. I don't want to allow unauthorized users to snoop around my report
applications.
Thanks for the tips though. At least your way looks cleaner then mine.
On ppDesigner1.OnChangeTab:
If (ppDesigner1.Notebook.ActivePage = 2) or (ppDesigner1.Notebook.ActivePage
= 3) then
//designer/preview tab (same menu)
begin
ppDesigner1.menu.Items[0].Items[6].visible := False;
// File | Save As
ppDesigner1.menu.Items[0].Items[2].visible := False;
// File | Open
if ppDesigner1.Menu.Items[2].items[0].Items[5].Checked = True then
// if visible then click to hide
ppDesigner1.Menu.Items[2].items[0].Items[6].Click;
// remove from menu so can't be made visible
ppDesigner1.Menu.Items[2].items[0].Items[5].Visible := False;
end;
Hope this helps someone,
Leah