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

How set designer layout to Fields

edited October 2004 in General
I know how to get a reference to the Data Tree window. Once I have that
reference I need to know how to select the Fields radio button on the
Layout tab in code

Thanks.

--
_Bill_

Comments

  • edited October 2004
    Hi Bill,

    I was able to use the CreateFields and CreateLabels properties of the
    TppDataTreeWindow class to select these radio buttons in code. Here is the
    code I used.

    uses
    ppDsgner,
    ppToolWn,
    ppIDE;

    procedure TForm1.ppDesigner1Show(Sender: TObject);
    var
    liIndex: Integer;
    lToolBarManager: TppToolBarManager;
    lToolWindow: TppDataTreeWindow;
    begin

    lToolBarManager := TppDesignerWindow(ppDesigner1.Form).ToolbarManager;
    lToolWindow := nil;

    for liIndex := 0 to lToolBarManager.ToolbarCount - 1 do
    begin
    if lToolBarManager.Toolbars[liIndex] is TppDataTreeWindow then
    lToolWindow := TppDataTreeWindow(lToolBarManager.Toolbars[liIndex]);
    end;

    if lToolWindow <> nil then
    begin
    lToolWindow.CreateFields := True;
    lToolWindow.CreateLabels := False;
    end;

    end;

    --
    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.