WPCubed Product Support

Protect Header and Footer from the "users"

Hi everyone,

How could I protetct the header and footer sections from a document?

The user is only allowed to write in the body of a letter, and I want to avoid that he/she changes them (header and footer).

Besides, I also would like to protect the vertical and horizaontal rules... how could I implement this?

Any help will be welcome. Thanks in advance.

Regards.

#1 ♥ 0
5.3k Views 3 users read 2 min

Hi,

  1. You may use EditOptionsEx [wpDisableEditOfNonBodyDataBlocks]
  2. What do you mean about 'to protect the vertical / horizontal rules'? Avoid the user to scroll? If so, just hide the scroll bars with ScrollBars := ssNone

Hope this helps

Alessandro Fragnani

#2 ♥ 0
support

Alessandro , Thanks

in property EditOptions and EditOptionsEx You will find other flags, i.e.

wpNoHorzScrolling, wpNoVertScrolling

#3 ♥ 0

First of all, I would like to thank you both of you for your help. The solution of avoiding to edit header & footer is ready.

I guess, I did not explain myself correctly about the Rulers.

I do have a certain value for the Top and the Bottom margins of my document; nevertheless the user can move this settings in the vertical ruler and so, the original settings too.

How could I avoid to modify the Top and Bottom margins with the Vertical ruler?

Once again, thanks a lot!

Regards.

#4 ♥ 0

Hi,

You may use TWPRulerOptions to solve this, in each Ruller assigned to the WPRichText.

TWPRulerOptions = set of (
    wrShowTabSelector,
    wrShowTabStops,
    wrShowIndents,
    wpUseIntervalls,
    wpNoVertRulerAttached, // should be enabled when you use a vertical ruler
    wpRulerReadOnly, // Don't allow draging of indent merkers
    wpPageMarginsReadOnly // Do not change margins of the page
    );

Hope this helps

Alessandro Fragnani

#5 ♥ 0
This category is archived. No new posts are possible.