Line on top of text box

Is there a way to insert a line and arrange it on top of a text box?
I see the option when I right click on the line but nothing happens. Maybe I’m doing something wrong or it might not even be possible. If it isn’t, why is there an option? … I have LibreOfice 7.0.3.1 on a Windows 10. I am doing this in writer. My text boxes are empty, they will be fillable when I export my document to PDF. I do not want to create a border around each of my text boxes either. My page has multiple of these textboxes. Since I have so many I need to create borders to group certain boxes and there is no pattern. Drawing/inserting individual lines seemed simple and easy but when I insert them they go behind the text boxes and therefore they can’t be seen. I tried selecting the line, chose menu - format - arrange - send to front - but the line stays behind the text boxes, it doesn’t go to the front.

EDIT: Now it is clear for me the confussion:

There are two different Text Boxes (1) from menu Insert - Text Box and (2) from menu Form - Text Box. I was writting about the (1). So this is no answer to the question. And no, I could not arrange the line in front of a Form Text Box.

The next is about the Insert Text Box:

The easiest way is to create first the text box, and then the line.

But if you created the line before, select it,¹ choose menu Format - Arrange - Send to Back Bring to Front.

¹ The Navigator (F5) could help.

More LibreOffice Help on Arrange.

Tested with LibreOffice 6.4.7.2 (x86); OS: Windows 6.1.


Add Answer is reserved for solutions. If you think the answer is not satisfactory, add a comment below, or click edit (below your question) to add more information. Thanks.

Average users have a misconception about text boxes. They are usually not the right object for the purpose.

What do you want to put inside the text box and how is it related to the main text flow?

How is the line? Horizontal, vertical, oblique? Over the border of the box? Stricken through? Should it be logically a part of the text box (grouped with it)?

Provide these additional by editing your question. Don’t forget to mention your OS name and LO version.

On this site, answers are reserved for solutions, so please take care to edit, not to answer.

If you want a “line” (i.n terms of LibreOffice “a border”) on a single side of a rectangular Writer element, use a “Frame” (Insert -> Frame) instead of a “Text Box”

@anon73440385: a frame is not necessary if the text is a word in a paragraph. This is why we need more information on the case before suggesting the “best” (and simplest) solution.

@ajlittoz & @anon73440385 thank you both for your response. I have LibreOfice 7.0.3.1 on a Windows 10. I am doing this in writer. My text boxes are empty, they will be fillable when I export my document to PDF. I do not want to create a border around each of my text boxes either.
My page has multiple of these textboxes. Since I have so many I need to create borders to group certain boxes and there is no pattern. Drawing/inserting individual lines seemed simple and easy but when I insert them they go behind the text boxes and therefore they can’t be seen. I tried selecting the line, chose menu, format - arrange - send to front but the line stays behind the text boxes, it doesn’t go to the front.

@leroyG I did create the text box first. From what you said it looks like you think I want to send the line to the back. I selected the line, chose menu - format - arrange - send to front - but nothing happened. The line stays under the text box. I don’t understand why.

If your goal is “only” to create a fillable form without using the other powerful formatting features for a text stream, your job looks like a graphic exercise. It will be more comfortable to do this in Calc if your form is grid-based or in Draw for free-position objects.

Note I have never tested fillable PDF form export from Draw, but it should work.

Sorry for my confusion. Just amended it.

@LeroyG no problem friend. Thank you very much. Still, I tried that but it doesn’t work. Do you have any idea why?

A workaround: Insert a 1 mm high Form Text Box.

@ajlittoz Bro, regardless of it being a graphic exercise, that is not the point. The issue is not with exporting a Draw to PDF. The question is not for Calc. It is simpler than that. You have a file in writer, you insert a text box then you insert a line (in which ever pattern you want, horizontal, vertical etc…) the point is that you drag the line and place it on top of the text box but it goes behind the text box. I tried the Bring to Front function by going to the Format menu on the top or right clicking on it and choosing arrange but it doesn’t work. It stays covered by the text box.I tried the same on Drawing and it didn’t work. I tried it on Calc and it worked. The line finally stays on top. WHY?! Where is the logic in that? it is a simple function. Why isn’t it the same on Writer? My file which has taken me days to make is in Writer. I don’t want to start it all over on Calc, besides Calc doesn’t work for my file. Why is LO so limited and hard to work with?

@Pii, You can fill a bug report at bugzilla. I can confirm the issue in LibreOffice 6.4.7.2 (x86); OS: Windows 6.1.

@LeroyG I submitted the bug report at bugzilla as you advised. Thank you very much. :slight_smile:

Bug report: tdf#138983.

@Pii: Writer is not limited and hard to work with. It is a text processing app. You want to use it outside its functional domain. The graphic features in it are only courtesy services for simple “decoration”. Whenever you need a sophisticated drawing, it must be designed in Draw for full control and pasted into Writer.

Form controls (e.g. a text box) are primarily intended to interface a database. Though you don’t seem to have a supporting database, have you tried to design your form with Base where it could be easier because you are not constrained by the text flow primitive in Writer. In Base, you place your items directly on a “page” or “screen” at position x,y without consideration for lines or paragraphs.