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

Hide 'Report Tree' from pop up menu

edited April 2007 in End User
Hi
I cant figure out how to hide the Report Tree item from the popup menu in
the end user designer.
I've looked at the example in
www.digital-metaphors.com/tips/Designer10_CustomizeMenusAndToolbars.zip and
have tried to apply same logic as hiding the standard toolbar but this
returns nil for the 'Report Tree'
ie
lToolManager.Toolbars.ItemsByName['Report Tree'];

I've also tried hiding it via the menu item
ie
TppDesignerMenu(ppDesigner1.Form.MainMenu).ViewMenu.Toolbars.Items[5].Visible
:= False but this only removes the menu item for the Report Tree and not the
toolbar popup menu item as well.

I'm using RB 10.05 on Delphi7.

I'd appreciate any suggestions..

Thanks
Gillian.

Comments

  • edited April 2007
    Hi Gillian,

    You can access the designer toolbar popup menu using the
    TppDesignerWindow.ToolManager.ToolbarPopupMenu property. The following code
    removed the data and report tree menu items...

    ppDesigner1.Form.LayoutManager.ToolManager.ToolbarPopupMenu.Items[3].Visible
    := False;
    ppDesigner1.Form.LayoutManager.ToolManager.ToolbarPopupMenu.Items[4].Visible
    := False;
    ppDesigner1.Form.LayoutManager.ToolManager.ToolbarPopupMenu.Items[5].Visible
    := False;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2007
    Thanks Nico
    that works perfectly :)

    Regards,
    Gillian

This discussion has been closed.