Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

In libre office, how to set a multiline label programmatically?

In Calc (libre office), I need to set the label of a button in a macro, with 2 lines. But everything is displayed in one line.

nb=5
button.Multiline = true
button.Label = "You are our " & nb & "th visitor \n Thank you"

The character ‘\n’ is displayed with the rest : "You are our 5th visitor \n Thank you"

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Just use & Chr(10) & instead \n

button.Label = "You are our " & nb & "th visitor" & Chr(10) & "Thank you"
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading