on 07-12-2014 11:52 PM
Hi, all,
I am having cca 100 TextView elements inside a MatrixLayout form, each in front of an InputField. They are here instead of Labels, because Labels can't wrap text and some of them are really long.
I have problems. I am trying to control their width programatically (eg set MatrixHeadData.width = '300px'), but this is ignored. They stay narrow and wrap in 6 lines (which is too much).
However, I noticed strange behaviour. I placed a dummy button on a view, doing nothing except triggering roundtrip by a bear fact that it has an action. Whenever I click it, the TextViews grow wider. After cca 7 clicks of growing little by little, they stop growing at some random width (not the one which I am setting). It seems like a bug.
Does anyone have idea?
Thanks!
KR,
Igor
Hi Igor,
The Label UI element can wrap-- it has a wrapping property that you can set to true or false.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thank you all for your valuable inputs - they are all good ideas on how to try to work this problem around.
@Amy: Yes, I saw this property, but I wasn't able to make it actually wrap. It was simply ignored in my labels. Moreover, in my case Label has another problem: length limit. I believe it is 136 characters (not sure is this exact, but roughly).
Unfortunately, I can't test this now since it was a short-term assignment which has finished. Sorry for delayed reply.
Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Place TextView elements in Transparent Container with fixed width.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Igor,
As suggested by Amy, there is wrapping option for labels as well.
If you need semantic coloring for labels, you can still consider textview.
Controlling alignment of textveiw elements as labels for input fields could a tricky job here.
You need to put every pair of textview and inputfield inside a transparent container i.e. for each row/line, a transparent container to be created. So that you can control the width / alignment easily.
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.