cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in wrapping of text in TextEdit control

Former Member
0 Kudos

Hi,

I'm developing an occasionally connected application using NetWeaver Mobile 7.1. In one of the view, I use TextEdit control to display the address information where the address is a multiline text data. During testing of the application in the simulator, the wrapping of text in the TextEdit control is not working properly. The wrapping property of TextEdit control is set to "soft" but the text is not getting wrapped. Even I tried the other option "hard" wrapping but it throws some error while building of the application.

Please suggest a solution to do wrapping of text using TextEdit control.

Thanks in advance.

Regards,

DVR.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi,

Set the rows and cols for the Text Edit. it should work.Also you can leave the wrapping to soft

for e.g. : You can maybe set rows as 5 and cols as 40

Regards,

Narayani

Former Member
0 Kudos

Hi Narayani,

As you said, the rows and cols property for the TextEdit control was already set. But still the problem exists.

Thanks & Regards,

DVR.

Edited by: Vinodh Raj D on May 28, 2009 2:21 PM

former_member206242
Active Participant
0 Kudos

Hi Vinodh,

As suggested by Narayani in her reply, that is the right way to see wrapped text in Text Edit control. If the data is not seen like that please check the actual data, may be the data there is not multiline ,i.e not containing new line characters.

Regards,

Nipun

Former Member
0 Kudos

Hi Nipun,

The rows and cols properties are already set and also the data is multiline but the text is not wrapping.

Say the properties of a TextEdit control rows is "4" and cols is "30" was set. The data is also a multiline text say each line has more than 30 characters. During wrapping of text with in TextEdit control the first row should have only 30 characters and rest should be wrapped off to the next row and so on.

But during execution what happens is the text is not getting wrapped instead the first row itself has all the characters of first line of the text and second row has next line of text and so on. The text in a row can be scrolled through using horizontal scrollbar.

My need is the horizontal scroll bar should not come and the text need to the wrapped off with number of cols specified.

Regards,

DVR

former_member206242
Active Participant
0 Kudos

Hi Vinodh,

Are you using the text edit control inside a table control?

Please send the exact text you want to display, I will check it myself as why the text is not showing in mutliple lines.

Regards,

Nipun

Former Member
0 Kudos

Hi Nipun,

Here I'm not using TextEdit control inside the Table control.

For sample text, here it is.

"Printer at John desk not working properly.

Check the problem and refill the catridges."

First set the rows and cols properties of TextEdit contorl as "3" and "20" respectively. They try using the above sample text.

Regards,

DVR.

former_member206242
Active Participant
0 Kudos

Hi Vinodh,

As the text itself suggests that there is no newline character like \n is there. So the control will not show the text in multilines.

Any text need to contain new line characters to be shown in multiple lines in any control. Please see that if you are entering this text using a control then these characters are auto inserted on enter but if you are creating this text in program then u need to new line chars.

E.g Printer at John desk not working properly.\n

Check the problem and refill the catridges."

Hope this this will solve the problem.

Regards,

Nipun

Former Member
0 Kudos

Hi Nipun,

Here the problem is not with multiline of TextEdit control, it works fine. The real issue is with wrapping of text in the TextEdit control.

Say the TextEdit control whose cols property is 30, suppose if the text goes beyond 30 characters it should get automatically wrap to the next row and so on. Either the text can be multiline or single line.

Regards,

DVR

former_member206242
Active Participant
0 Kudos

Hi Vinodh,

I checked the TextEdit control. Please check the properties at your end. for e.g. keep the column property to 30 rows to 4 and wrapping to soft.

Give a value of around 50 chars as string to the bound context attribute for the control.

The control wraps the text according to the character size. If the characters are less than column prop then you need to add newline character to see the text in multiline.

Please check again.

Regards,

Nipun