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

Adding menu

edited February 2009 in End User
Hi!

Is there a easy way to add menues to a custom report explorer? Do you hav a
demo or a tutorial for it?

Best regards,
Terje

Comments

  • edited February 2009
    Hi Terje,

    The best way to add menu items or additional menus is to use the method we
    use when creating the default Report Explorer dialog. Take a look at the
    TppReportExplorerForm.Initialize, and LoadMainMenu routines for how this is
    done.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2009
    Hi!

    First i have to say this. Your newest release is a great piece of software
    with some excellent improvement from your previous releases. Keep up the
    good work, which i'm sure you will.

    I used your '04. End-User with Custom Explorer" and added the code below to
    LoadMainMenu.

    FBoman := FMenuBar.AddSubMenu;
    FBoman.FontSettings.Color := clBlack;
    FBoman.Caption := 'Boman';
    FProvider := TppTBXCustomItem.Create(Self);
    FProvider.Caption := 'Provider';
    FProvider.Tag := 1;
    FProvider.OnClick := bomanMenuClick;
    FBoman.Add(FProvider);

    That works very well. I would like to add my own images to the custom
    menues. Is this possible?
    If so, could you please give me a clue on how to solve this?

    Best regards,
    Terje


  • edited February 2009
    Hi Terje,

    You can use the global ToolImageList object to add images to each TBXItem.
    The ToolImageList is simply a descendent of a TImageList. You can either
    add images to the list before assigning the index or in line. Something
    like the following...

    uses
    ppToolResources;

    FBoman.ImageIndex := ToolImageList.Add({image});

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.