# how to specify line break in label. [closed]

chillworld
5347 4 9
https://github.com/chillw...

I'm trying to set a line break in a label.

First the wiki page.

Then the fiddle.

<br/> and \n are just showing up as text.

Should I create bugtracker for this or is something else wrong?

Greetz chill.

delete retag edit

## 5 Replies

Senthilchettyin
2623 3 8
http://emrpms.blogspot.in...

The following code works fine for me

<label value="@bind(vm.sorryMessage)"/> this.sorryMessage = "An unexpected error occured.Our Engineers have been notified of this \nproblem and expect to resolve it shortly.";

chillworld
5347 4 9
https://github.com/chillw...

Hey Senti,

Thx for the funny reply :). Now as you where already thinking, the data of the label was hard coded in the zul :). (normally it wouldn't change only with a new release so the less overhead the better) I fixed it by using an textbox with multiline and readonly true. There it work normally as the wiki describes.

Greetz chill.

Senthilchettyin
2623 3 8
http://emrpms.blogspot.in...

Just for example, i have shown that, still that label value can be read from the DB :)

henrichen
3869 2
<label multiline="true">
<attribute name="value">line 1
line 2</attribute>
</label>


See ZK Component Reference for details:

chillworld
5347 4 9
https://github.com/chillw...

Henrichen, thank you. Don't get it why I didn't try that. Feel me a little bit stupid now. :D

Now for the updated fiddle.

Also updated the wiki and put the multiline in there.

Greetz chill.