TWPManageHeaderFooter

<< Click to Display Table of Contents >>

Navigation:  Programming > User Interface > Layoutmodes >

TWPManageHeaderFooter

"Manage Header and Footer", a useful dialog

 

WPTools comes with a useful form in unit WPManHeadFoot to work with header and footer.

 

clip0064

 

This form makes it easy to navigate to a certain header or footer. It can be edited, copied or deleted. The two buttons switch between the page layout mode and the normal layout mode. If the user clicks on a header or footer which is currently not visible, the text cannot be edited in page layout mode, so the dialog will automatically select the normal mode.

 

To use this form add the unit to the uses clause and create a global variable:

 

ManHeadFoot : TWPManageHeaderFooter;

 

Now, to show the form in a non-modal:

 

if ManHeadFoot=nil then

    ManHeadFoot := TWPManageHeaderFooter.Create(Self);

 ManHeadFoot.WPRichText := WPRichText1;

 ManHeadFoot.Show;

 

We recommend to check out the source of this dialog since it also contains good example code.