1 (edited by hfdax 2021-01-27 16:17:39)

Topic: [SOLVED] End Of Line in labels

Hello to all.
It would be very useful, at least for me, to be able to carriage return in the text of an element label. For example, in the "comment" label you can write:
green = ON
red = OFF
instead of: green=ON - RED = OFF (on a single line).
Often, in fact, writing the text on a single line, the label becomes too long and interferes with the other elements or texts of the diagram. And it happens that by shortening the text too much, the label (useful to put in the diagram descriptions inked to an element) becomes incomprehensible. So is there a way to do it?

Thanks.
dax

2 (edited by De-Backer 2020-12-05 19:16:31)

Re: [SOLVED] End Of Line in labels

this is possible, if you do this in a text editor,
but I don't know how QET deals with it.

see
sources/ui/elementinfopartwidget.cpp

Post's attachments

Attachment icon Screenshot_20201205_180133.png 90.73 kb, 63 downloads since 2020-12-05 

Re: [SOLVED] End Of Line in labels

Maybe this trick will help you. This only works with user text. Open your element in the element editor and add a "user text" and edit the "user text" for example "green = ONred = OFF", save and close the element editor.
Open your "Symbol.elmt" with an editor (like notepad ++), search for the user text "green = ONred = OFF", put the cursor behind the "N", press Enter, and delete all spaces or tabs in front of the text ("red = OFF "must be at the beginning of the line). Save.
Insert the symbol into the drawing and you're done.

Re: [SOLVED] End Of Line in labels

https://qelectrotech.org/forum/viewtopic.php?id=1195

Re: [SOLVED] End Of Line in labels

This works in Dynamic text fields where you set the Source of text to: Composite text.

Post's attachments

Knipsel-f1.JPG, 70.76 kb, 725 x 548
Knipsel-f1.JPG 70.76 kb, 158 downloads since 2020-12-08 

Re: [SOLVED] End Of Line in labels

https://download.tuxfamily.org/qet/forum_img_2/composite_2.png
https://download.tuxfamily.org/qet/forum_img_2/composite_3.png
https://download.tuxfamily.org/qet/forum_img_2/composite_1.png

7 (edited by hfdax 2021-01-26 16:23:48)

Re: [SOLVED] End Of Line in labels

Sorry for the long absence, due to personal problems (now solved nomicons/smile).
Now I'm back in operation and will try the suggested solutions.
Thank you all.

Dario

8 (edited by hfdax 2021-01-27 16:23:38)

Re: [SOLVED] End Of Line in labels

@scorpio810. Your suggestions are useful, thanks a lot.