on 10-07-2014 2:07 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Patrick,
I am not sure whether you will be able to do it using text box but it can be achieved using label.
In label you have WrapText check box, check it and set the width and height of your label(if you keep NaN it will keep on expanding).
Please try and let know if it works for you.
Regards,
Karthikeya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Karthikeya, I appreciate the feedback.
I have two similar but different requirements:
i) Display long text with no option to update it. For this the label idea works well in terms of text wrapping but it has a vertical alignment of centre which is not ideal as you end up seeing a section from the middle of the text rather than the first paragraph. I don't want to appoint a large area of the screen to this as the majority of the texts are relatively short - it will only be the exceptions that are long and push the boundaries of the box.
ii) I want to display a long text field AND offer he possibility of changing it. For this the label idea does not work as it is by nature a read only field.
Hmmm... are there any other ways to look at this?
Regards.
Patrick.
For the first point, you can have 2 labels say label1 and label2 put one on another.
Select WrapText only for one label say label1.
If the text is short then print on label2, if its long and needs to be wrapped then print on label1.
You can find length in script using java script.
Hope this makes sense to you.
Regards,
Karthikeya
P.S: For the second one I don't think you have any option to make it wrap-able and editable at the same time.
Once again many thanks for taking the time to respond Karthikeya but I don't think this is the answer for me.
On point one, the text will always have to wrap, but not all of them will be long enough to be come confused by appearing as vertically aligned on the centre.
On the second point it is important that I can wrap and edit.
Tricky - maybe this will require some lateral thinking but at the moment this doesn't work satisfactorily ... maybe someone else has some thoughts.
Thanks.
Patrick.
Hi Manu - thanks for the reply ... sounds promising but I can't see how I would use JS in this context.
I've only just started using JS so forgive me if I appear dim but the examples I can see on the web are directly mixing JS code with HTML. In a Personas environment, I don't believe we deal with the HTML first hand so I can't quite see how to make this work.
Can you say a few more words and perhaps be a little more proscriptive.
Regards.
Patrick.
Hi Patrick,
Apologies!!!
I wrote a Javascript function to do this but unfortunately the TextBox is not allowing multiple lines in Personas.
If you screen has a TextEditor which comes from the basic view, wrapping can be done on it.
Unfortunately we cannot create a TextEditor control onto a flavor.
Probably we can discuss more on your scenario.
Regards,
Manu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.