"Brian Barker" <b.m.bar...@btinternet.com> wrote in message news:227209.54859...@smtp823.mail.ukl.yahoo.com...
At 19:57 06/09/2010 +0100, Harold Fuchs wrote:
OOo 3.2.1 Win XP Pro and Vista Home Premium.

I'm trying to create a Writer template that has a series of "boxes" (outlined rectangular areas). Each box should have a *fixed* piece of text and space for editable text. The idea is that when a user creates a new document from the template, the fixed text is *not* editable but s/he can enter new text to the right of and/or below the fixed text. So, for example, a box might contain the *fixed* text "First Name: " and the user is expected to enter his/her first name in the box. In other words I'm trying to design a form to be filled in on the screen. I've tried text boxes with captions and I've tried frames with captions. In both cases, when I create a new document from the template, the captions are editable which is the exact opposite of what I want (and what I'd have expected). I also tried an elementary form with a label field but the text of the label gets overwritten with text I enter and the cursor isn't pre-positioned in the right place (after the ": " of "First Name: " for example).

A simple technique works for me (on 3.1.1 for Windows XP Home):
o  Create and position a frame and enter the fixed text.
o  Select the frame - so that you see the eight green handles.
o Go to Format | Frame/Object... | Options | Protect (or right-click | Frame... | Options | Protect).
o  Tick at least Contents and probably Position and Size.

If I save a document with a protected frame as a template, the protections are carried through into a document created from the template - as you need.

Yes, the protections are carried through to the "generated" document and, for this reason, the technique is not sufficient because the user can't type into the content-protected frame. The idea is that the left/top part of the fram contains an unalterable "label" sucha as "First Name: " which the user can't touch


It is possible, of course, to put a frame within a frame, and you could presumably achieve what you need by doing this. The outer frame would have a border and be the visible box, and the inner frame would have no border and be an invisible container for your fixed text. Both frames would have their position and size protected, but only the inner frame would have its contents protected. Repeat for each required box.

This works as advertised :-) but it's extremely tricky to set up accurately - getting the fixed text to be in the right place relative to the editable text is fiddly to say the least.

Why is this apparently simple task so tricky?



It is possible - indeed, easy - for users to remove these protections in new documents if they wish (and know how), so this protection serves only to avoid accidental changes. But you knew that.


Indeed.


I trust this helps.

As usual, thanks.


Brian Barker



--
Harold Fuchs
London, England
Please do *not* reply to my personal e-mail address.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.org
For additional commands, e-mail: users-h...@openoffice.org

Reply via email to