2 Replies Latest reply on Sep 7, 2012 3:11 PM by Flex harUI

    RadioButton Label won't truncate

    eZACKe Level 1

      I have RadioButton, just one singular RadioButton not in a Group or anything like that. I set it's width to 100. I then give it a label which is much longer than 100px. Also, in the Skin for this RadioButton I have the Label just being a subclass of Spark Label in which I set the showTruncationTip of TextBase to true because that's the behavior I'm looking for.


      So the Label should truncate, should it not? Instead, my label shows the entire thing not truncated at 100.


      However, if I do the same exact thing but with a CheckBox, it works correctly.


      Here's the MXML for my RadioButton:

      <myNameSpace:RadioButton  width="100" id="radBtn1" value="1" label="Yoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" />


      And here's the relevant bit in the Skin:

      <s:HGroup width="100%" left="18" gap="5" y="{ icon.height === 0 ? 2 : -4}" verticalAlign="middle">

                          <myNameSpace:Icon id="icon"/>

                          <myNameSpace:Label id="labelDisplay"






      And just to show you that it's basically the same, here's my CheckBox Code:

      <myNameSpace:CheckBox id="checkBox" width="100" label="Click here to turn this On"/>



      <s:HGroup left="18" right="0" top="3" bottom="3" verticalCenter="0" verticalAlign="middle" width="100%">

              <myNameSpace:Label id="labelDisplay"


                       maxDisplayedLines="{getStyle('wrapLabel') ?  -1 : 1}"

                       width="100%" />

              <myNameSpace:Label id="readOnlyLabel" includeIn="readOnly"/>





      So what's going on? I even tried just doing this with a normal Spark RadioButton but even that won't truncate.