Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
mdarr
Posts: 5
Registered: ‎08-25-2012
My Carrier: Bell

Displaying paragraph of text

How can I display a paragraph of text in my app? from my main page I want user to click an image that will take them to another page and display some text.  I don't want to ue the TextArea as I don't want user input, simply want to display a paragraph of text under an image. 

Please use plain text.
Developer
dishooom
Posts: 103
Registered: ‎12-31-2012
My Carrier: Verizon

Re: Displaying paragraph of text

If the text that you have dont change dynamically, i guess you can create an html file as an asset and load it using a webview.

 

WebView {
    id: webView
    url: "local:///assets/webview/javascriptmessage/test.html"
}

 The paragraph formatting can then be added within the html file.

 

- Dishooom

 

--------------------------------------------------------------------------------------------------------------------------------------------------------

Hope this helps... :Angel:

 

Please use plain text.
New Developer
Thogek
Posts: 42
Registered: ‎01-14-2011
My Carrier: AT&T

Re: Displaying paragraph of text

Good idea, dishooom.  Although, oddly, my testing-so-far Cascades app seems fail to "run as..." if I add an HTML file into the /assets/ tree, even if I don't reference it...  :smileysad:

 

It does seem rather odd that this method should be necessary to display a paragraph or two of text.  :smileyfrustrated:

Please use plain text.
Developer
oliver_kranz
Posts: 216
Registered: ‎09-18-2009
My Carrier: O2

Re: Displaying paragraph of text

You could set the TextArea to be not editable.

 

TextArea {
    editable: false
}

 Or you could just use a Label.

Please use plain text.
New Developer
Thogek
Posts: 42
Registered: ‎01-14-2011
My Carrier: AT&T

Re: Displaying paragraph of text

That sorta works.  I also [belatedly] found the Label's multiline property, which when set to "True", yields a similar result.

Now to play with how to format the text within either of these.  HTML content works, but seems to get rendered a little weirdly...

:Wacko:

Please use plain text.
New Member
NazHircus
Posts: 1
Registered: ‎07-19-2013
My Carrier: Digi

Re: Displaying paragraph of text

Its help me =) Thanks!!
Please use plain text.