1

Multi line in Listheader

asked 2014-04-01 12:58:45 +0800

bbolek gravatar image bbolek
98 1 5

Hello;

How can we use multiline in listheader? Some suggestions that I found in internet do not work in 7.0.1..

We are using multilanguage

Ex: ${labels.historybox.last7days}

have a good day..

delete flag offensive retag edit

Comments

can you show the code of your listheader?

chillworld ( 2014-04-01 14:27:30 +0800 )edit

6 Answers

Sort by ยป oldest newest most voted
1

answered 2014-04-01 17:46:15 +0800

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

updated 2014-04-02 08:20:21 +0800

Oke,

Lol third or fourth time I edit this answer(drafts weren't saved :s).

You make a mistake by your testing.

Wrong :

<label multiline="true" value="Burak\nASDASD"/>

Your value is set direct and never parsed again to explain it fast and simple.

Correct :

<label multiline="true" value="${labels.historybox.last7days}"/>

and prop file :

historybox.last7days = {
                        This seems the same.
                        But it react differently.
                       }

Explication prop file :

see the last documentation link, format of the prop file.

This fiddle shows this example.

edit: corrected the prop file,added more doc and tested myself => working.

More docs :
Frequently Asked Questions : How to specify line break in Label
Maxlength and Multiline
The Format of Properties Files

greetz chill.

link publish delete flag offensive edit
0

answered 2014-04-01 15:12:14 +0800

IngoB gravatar image IngoB flag of Germany
256 6

updated 2014-04-01 15:13:56 +0800

Quick&Dirty

Use a Label and set Multiline = true.

link publish delete flag offensive edit
0

answered 2014-04-01 16:07:16 +0800

bbolek gravatar image bbolek
98 1 5

Hello;

I tried

<listheader sclass="font10px" hflex="min" ><label multiline="true" pre=true" value="Burak\nASDASD"/></listheader>

and some other combinations... It didn't work...

link publish delete flag offensive edit
0

answered 2014-04-02 07:14:52 +0800

bbolek gravatar image bbolek
98 1 5

updated 2014-04-02 07:27:28 +0800

Hello;

The only suggestion that works is

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

Others don't work:(

This also does not work with multilanguage...

Have a good day...

link publish delete flag offensive edit
0

answered 2014-04-02 07:52:35 +0800

IngoB gravatar image IngoB flag of Germany
256 6

updated 2014-04-02 07:55:33 +0800

ZUL

<listheader sclass="font10px" hflex="min" ><label multiline="true" id="myLabel"/></listheader>

JAVA

myLabel.setValue(Labels.getLabel("historybox.last7days").replaceAll("<br>", "\r\n"));

PROPERTIES

historybox.last7days=Burak<br>ASDASD

This may NOT! be pretty, but it works :)

Here a working example zkFiddle

link publish delete flag offensive edit
0

answered 2014-04-03 09:56:52 +0800

bbolek gravatar image bbolek
98 1 5

Thanks for information:) You are really creative:)

But we are using MVVM pattern, and doing this to every label is impossible.. We may extend label class to to this...

Thanks again:)

link publish delete flag offensive edit

Comments

@bbolek for who was this post? greetz chill.

chillworld ( 2014-04-03 10:09:27 +0800 )edit

I guess, me :)

IngoB ( 2014-04-03 15:53:46 +0800 )edit

well also credit to you, it was a nice work around that was found fast.

chillworld ( 2014-04-03 16:34:53 +0800 )edit

You both guys:) I wasn't expecting this much answer:)

bbolek ( 2014-04-04 17:44:34 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-04-01 12:58:45 +0800

Seen: 72 times

Last updated: Apr 03 '14

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