THPDFDocOutlineObject.AddChildFirst

THPDFDocOutlineObject

 

Top  Previous  Next

Prepends a child outline item before the current first child

 

Delphi syntax:

function AddChildFirst ( Title: AnsiString; X: Single = 0; Y: Single = 0 ): THPDFDocOutlineObject;

 

C++ syntax:

THPDFDocOutlineObject * __fastcall AddChildFirst ( AnsiString Title, float X, float Y );

 

Description

Use AddChildFirst when a new child outline item must become the first item under an existing parent. The method links the new outline item to the specified X and Y coordinates on the current page and keeps the saved sibling order aligned with the in-memory outline tree

 

Code Example

var
  ParentOutline: THPDFDocOutlineObject;
begin
  ParentOutline := HPDF.OutlineRoot.AddChild('Chapter');
  ParentOutline.AddChild('Second topic');
  ParentOutline.AddChildFirst('First topic');
end;