Skip to main content
Known Participant
March 27, 2011
Question

Buttons Text when clicked is jumping to show "..."

  • March 27, 2011
  • 1 reply
  • 649 views

Yup maybe it's when I'm scalled to fit different Mobile Devices or something but regardless of the width of an iconed button, when I click on the button and call popView via navigator in the MobileApplications, I see briefly the text in the button change from say "Button" to "But..." {dot dot dot} (aka trucncate) and there is no resizing or solution I can find to resolve (looks pretty bad & buggy really).

I suspect at this point it's too tightly constrained in size internally and goes bold when clicked (via the default skin maybe) and that triggers this issue.

Any work around? Well it's not obvious, other then obviously buggy...

What else can I say, I haven't really explaored how easy this is to reproduce?

I also just added a discussion thread about proper scalable distributed spacing in Groups and suspect this is related to that. If the text inside the button truly scaled to fit the button as it is resized there is no way the text could ever truncate, even when I set the button width to 10 times the width of the text this occurs.

Oh I just thought maybe I can dig into the button and get the text and plus 10 it's width for every button everytime.

This topic has been closed for replies.

1 reply

as4moreAuthor
Known Participant
March 27, 2011

I've tried this...

            DisplayObject(myView.myButton.labelDisplay).width += 200;
Pretty funny. It didn't fix it.

I'm seeing this...

in the htmlText for labelDisplay

<TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="_sans" SIZE="24" COLOR="#FFFFFF" LETTERSPACING="0" KERNING="0"><B>Button</B></FONT></P></TEXTFORMAT>

Hmmm...

            Object(myView.myButton.labelDisplay).textWidth += 10;
ReadOnly?!

Right well this is not the easy fix I hoped to find either.

as4moreAuthor
Known Participant
March 27, 2011

At this point I'm looking inside a spark button for internal align values and left wondering are we suppose to eat style sheet cake for that?

Not here...

            myView.myButton.setStyle("paddingLeft", 0);
            myView.myButton.setStyle("paddingRight", 0);
            myView.myButton.setStyle("paddingTop", 0);
            myView.myButton.setStyle("paddingBottom", 0);

... it actually helps to reproduce the dot truncated effect.

as4moreAuthor
Known Participant
March 30, 2011

Now it seems when I trace the fontSize from getStyle

trace("Button Label's FontSize " + myView.myButton.getStyle("fontSize"));

The first time I see 24 then next time I get undefined?

I am of course scaling a group of buttons via an HGroup. It's ultimately a menu and animated with TweenMax. You go to a selection via the menu button and back and it animates again. Anyway clearly scaling damages the ability for the style's fond size to be maintained properly.

Alright well if I still tray to setStype the fontSize to 24 it's still truncated and not visible. But that's cause there's a when in progress still.

Anyway without the tween it's not so bad but there are still some "problem childs" walking around.

[Note: for the record I had so many problems with the so called new 3D stuff not working as in setting a pivot point I had to resort to other 3D libs and TweenMax ]

{Further as to the (Not Molehill) 3D added recently... instead of animating in with scaling I use z the origin is not calculated based on the center? Smaller device sizes and larger device sizes see the object come from left or right as the center of the 3d z depth is not in the center of the screen... a wrong behavoiur too.

You can't in this adjust X or Y to compinsate like because of a layout management of that HGroup... even top seems to do nothing. I should start a new thread for this... still any ideas about moving the camera target or z buffer center?}

Again even if I set the fontsize to low value's it still truncates. I'm guessing because it's just too tight around the label's width and height. It seems still related to my concerns about how layout is potentiall improperly layed out as explained by me in another thread.

So with animation Tweens totally turned off at the higher Mobile Device resolutions (via my code painfully once design) are more subject to button label truncation.

Since I use Droid Incredible as my default development size it is a scale of 1.0

iPhone is

scaleX:0.6451612903225806 scaleY:0.5416666666666666

and Xoom is

scaleX:2.5806451612903225 scaleY:0.9338235294117647

I guess the Xoom numbers seem odd because of it's default orientation being sideways?

Well anyway I'm just trying to provide the details that surround these circumstances.


So it just becomes a bigger and bigger problem.