Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Hide Open and Save buttons on Standard Toolbar

edited May 2005 in End User
Is this possible? I figured out how to hide the menu options but I can't
figure out how to hide the buttons. Thanks.

SMP

Comments

  • edited May 2005
    Hi,

    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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2005
    Nico,

    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
  • edited May 2005
    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.




    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.