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
Posts: 2
Registered: ‎09-17-2012
My Device: developer
My Carrier: None

TextArea line limit and appending

i'm searched everywhere and can't find an answer to this, so sorry if its already common knowledge.

 

The main issue is that I'm trying to read in a very large text file, but it will only read in 546 lines onto the TextArea, it is also a updated often and I want the textArea to reflect new lines in the text file, but I want it to append to the text Area and not just do a settext and redisplay everything. 

 

so the questions are

 

1. Is there some line limit on a TextArea control that is preventing more the 546 lines to be written?

 

  - I tried playing with the min and max settings and such, it doesn't seem to make a difference.

  - I tried using the parent control 'abstractTextControl' and it also limits at 546 lines

 

2. Is there a way to append text to a TextArea instead of setting the whole text everytime.

 

  - at a total loss on this one.  spent the better part of a day searching and trying to figure it out.

 

Thank You.

Highlighted
Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
My Carrier: Telekom.de, O2, Vodafone

Re: TextArea line limit and appending

if the 546 - lines - limit is reproducable you should submit an Issue

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner
New Developer
Posts: 10
Registered: ‎08-23-2013
My Device: Blackberry Z10
My Carrier: Bell Mobility

Re: TextArea line limit and appending

I know it has been a while now but I know there is editor().insertPlainText(QString)

 

Now I am stuck with this still...I want to append a line of html but only plain text works.

 

Did you find anything on your side?

Developer
Posts: 49
Registered: ‎05-31-2013
My Device: Z10, Passport

Re: TextArea line limit and appending

Can you specify please if it is your intent to give the user the option to edit this textarea, or you just want to display text. Are you using a simulator or device to get that result?

New Developer
Posts: 10
Registered: ‎08-23-2013
My Device: Blackberry Z10
My Carrier: Bell Mobility

Re: TextArea line limit and appending

[ Edited ]

The user will not edit this textarea, only read it. But new lines need to be inserted. Of course I could do textBox +=  newLine but it must have something else available.

 

I am using a device.

Developer
Posts: 49
Registered: ‎05-31-2013
My Device: Z10, Passport

Re: TextArea line limit and appending

Try to use a label component in multiline mode instead. A quick construct to get you started:

Page {

    Container {
topPadding: 100 Button { property string txt: "duha duh audhayugau alslfkash fkas fjashvahs nacv ga cnasvc ac acg acg ajcgausugasujdg asjfga jfaghgash fasfgashjfgajsgfjasgfjasgfhasfgjkf a jaksgfjsafg " text: "Add text" onClicked: { mylbl.text += txt; } } ScrollView { id: sv scrollViewProperties.scrollMode: ScrollMode.Vertical scrollViewProperties.pinchToZoomEnabled: false Label { id: mylbl multiline: true onTextChanged: { sv.scrollToPoint(0, 450000, ScrollAnimation.Smooth); } } } } }

 If you keep getting TextArea error, report it.