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

How to access / hide the tabs of the PageSetip dialog?

edited October 2009 in End User
Hello,
as the title says, I would like to know, how I can access and hide the tabs
of the PageSetip dialog - especially the "Layout" tab.
I didn't find anything about it here in the newsgroups or in the rbWiki.

Comments

  • edited October 2009
    Hi Mark,

    All the dialogs in ReportBuilder are completely replaceable. Take a look at
    the following articles on how this is to be done...

    http://www.digital-metaphors.com/rbWiki/Plugins/Dialogs/Replaceable_Dialogs

    http://www.digital-metaphors.com/rbWiki/Plugins/Dialogs/How_To...Create_a_Custom_Print_Dialog

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2009
    Hi Nico,
    I wasn't thinking about my own form here. I hoped it's possible to do it on
    a different way.
    To copy the original form is never good in my opinion. Because of potential
    future updates etc.

    I tried to do the following:

    TmyPageSetupDialog = class(TppPageSetupDialog)
    procedure FormCreate(Sender: TObject);
    private

    public

    end;

    + registering of that class
    ...
    ...

    procedure TmyPageSetupDialog.FormCreate(Sender: TObject);
    var
    liTabIndex: Integer;
    begin
    inherited;

    liTabIndex:= Notebook1.Pages.IndexOf('Layout');

    if liTabIndex<> -1 then begin
    Notebook1.Pages.Delete(liTabIndex);
    end;
    end;

    ---------------

    liTabIndex is 3, which is the correct index.
    Unfortunatelly "Pages" is TStrings only and
    "Notebook1.Pages.Delete(liTabIndex);" leads to an AV at 000000000.

    I hoped to be able to access the FTabSet then, but it's private. So it's
    close, but seemingly not possible to control the tabs / pages.
    Any chance that this could be changed? I mean why to copy the whle original
    form, if such small changes could be done without doing it too. A
    PageControl instead of a notebook+TabSet would do it alredy, I think.

    Regards,
    Mark


  • edited October 2009

    One option is to iterate over Form.Components[ ] or Form.Controls[ ] to find
    the TabSet.

    We can make TabSet a public property for the next maintenance release.



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2009
    Hi Nard,
    thank you for the idea - it works!

    Also: making the TabSet public sounds good.

    Regards,
    Mark

This discussion has been closed.