0

how to specify line break in label. [closed]

asked 2014-03-03 08:54:15 +0800

chillworld gravatar image chillworld flag of Belgium
5367 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 flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by chillworld
close date 2014-03-04 06:59:31

5 Replies

Sort by » oldest newest

answered 2014-03-03 11:55:10 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
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.";

link publish delete flag offensive edit

answered 2014-03-03 12:32:48 +0800

chillworld gravatar image chillworld flag of Belgium
5367 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.

link publish delete flag offensive edit

answered 2014-03-03 13:25:56 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...

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

link publish delete flag offensive edit

answered 2014-03-04 02:07:18 +0800

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

See ZK Component Reference for details:

link publish delete flag offensive edit

answered 2014-03-04 06:53:44 +0800

chillworld gravatar image chillworld flag of Belgium
5367 4 9
https://github.com/chillw...

updated 2014-03-04 07:05:10 +0800

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.

link publish delete flag offensive edit

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-03-03 08:54:15 +0800

Seen: 188 times

Last updated: Mar 04 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More