08-21-2012 08:31 AM
Hello,
I want a label which contains multiline text.
But thanks to other guys who had also experience the same thing i.e label doesnot support multiline.
No my another problem is I want some word in that text with the different style.
example
Hello "My name is bskania".
How can I set this?
I had used textarea to display text.
Thanks In advance.
bskania.
08-21-2012 10:35 AM
Hi there,
You cannot currently bold words in a text field;
You could always use a WebView and control rich text using html5, which will give you the flexibility to customize text in any way you want;
Martin
08-21-2012 11:25 AM
We (the community) have a few feature requests in JIRA for a RichTextField type control so hopefully that gets done by the time it goes gold. WebView is way too heavy for 95% of use cases. Im not going to embed a webview in every list item.
08-22-2012 05:51 AM
Hello.
Is it possible to use webview with another comonent on the same container.
Its occupy full height and width of container.
08-22-2012 09:02 AM
Have you tried preferredHeight?
Have you tried StackLayoutProperties spaceQuota?
Stuart
10-06-2012 12:08 PM
Regarding the Release Notes there should be a RichTextField since the Beta 3, but I'm unable to find it anywhere in the documentation or the SDK.
Are here anyone able to see those new features?
10-06-2012 12:33 PM
10-06-2012 05:28 PM
peter9477 wrote:
The docs haven't been updated, but try just using a few basic HTML elements such as <b> and <i> and you should see that they work for the moment. I believe you need to have the text wrapped with <html> and </html> but maybe not... and I haven't experimented with it yet myself. I'm just reporting what one of the guys in the #blackberrydev IRC channel on freenode.net reported to us.
Ah, I had to wrap my text into <html> </html> tags and it just works. Thanks! ![]()
10-22-2012 08:48 PM
Is there no way to combine html tags and property variants from JSONs?
I have a label as follows:
Label {
text: "<html><b>blah</b></html>\n" + countryView.id
multiline: true
}
The property variant in this case is countryView from a JSON list, and showing its "id".
What happens is that the html tags come verbatim, as in they're not applied. But the "\n" works and countryView.id goes to the next line.
Furthermore, is there any way to do this...where the "bold" applies on the property Variant itself?
Label {
text: "<html><b>countryView.id</b></html>\n" + countryView.name
multiline: true
}
Thanks.
10-23-2012 12:51 AM
Your whole string needs to be in html tags for it to work, you can mix and match.
Label {
text: "<html><b>blah</b>\n" + countryView.id + "</html>"
multiline: true
}
Label {
text: "<html><b>" + countryView.id + "</b>\n" + countryView.name + "</html>"
multiline: true
}