Which menu bar would you like to alter? If you are talking about the main menu bar of the designer, you can access the TMainMenu object using the Designer.Menu property.
Not the menu. I already know how to hide those items. I was referring to the Standard toolbar - specifically the Open and Save buttons. I'm sure I can go into the source and hardcode the buttons to not be visible but I would rather not change your source code, if possible.
I tried the following code that I found but ToolbarManager is always nil.
That should work, its probably a timing issue. The Designer delays the creation of the toolbars until the window is shown. See CreateToolbars and SafeCreateToolbars methods in ppDsgner.pas. We had to delay creation to avoid AV's - I think the toolbars are not very robust.
Try delay your code to the Form.OnShow and trace the source to see if the toolbars get created before that event fires.
Comments
Which menu bar would you like to alter? If you are talking about the main
menu bar of the designer, you can access the TMainMenu object using the
Designer.Menu property.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Not the menu. I already know how to hide those items. I was referring to the
Standard toolbar - specifically the Open and Save buttons. I'm sure I can go
into the source and hardcode the buttons to not be visible but I would
rather not change your source code, if possible.
I tried the following code that I found but ToolbarManager is always nil.
uses
ppEndUser, ppDsgner, ppDesignerTools;
lDesigner := TppDesignerWindow(myDesigner.Form);
lDesigner.ToolbarManager.Toolbars[]
Thanks.
SMP
creation of the toolbars until the window is shown. See CreateToolbars and
SafeCreateToolbars methods in ppDsgner.pas. We had to delay creation to
avoid AV's - I think the toolbars are not very robust.
Try delay your code to the Form.OnShow and trace the source to see if the
toolbars get created before that event fires.
--
Nard Moseley
Digital Metaphors Corporation
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com