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
Developer
bobdodd
Posts: 116
Registered: ‎10-31-2012
My Device: BB10 Dev Alpha B

Odd behavior when using setTranslationX() on a Container of a Label

I think  there may be a problem with the clip area when translating the position of a container of a Label. If I use something like:

 

distanceContainer->setTranslationX(400.0f);

 

the label translates correctly,  but  the clip does not update so that the label truncates or disappears completely if the translation is beyond the width of the label.

 

I'm a relative newbie to Cascades, so I'm wondering if  this is a real bug  or if I'm missing some extra step?

 

The problem existed in Beta 3, and is still there on Beta 4. In both cases I'm testing using the Dev Alpha B with  versions 388 and 1103 of the firmware.

 

 

Developer
bobdodd
Posts: 116
Registered: ‎10-31-2012
My Device: BB10 Dev Alpha B

Re: Odd behavior when using setTranslationX() on a Container of a Label

I have a workaround for now: I'm padding out strings with spaces to widen the clipping area (all my X translations are positive). But it's a horrible thing to be doing: what happens if  my text is shorter in another language?

 

Since I haven't had any feedback, I'm assuming that it really is a bug rather than me doing somethign wrong, so I'll go raise an issue. It just seemed so unlikely to be a bug, basic testing of the feature during development should have caught it (translate label to right and see if it's in the correct place and visible). It's not a subtle bug.