3 Replies Latest reply on Oct 20, 2010 12:51 PM by Flex harUI

    Checkbox position in a list through an itemrenderer

    Loic.Aigon Adobe Community Professional

      Hi all,

       

      I did make some search and couldn't find anything helpful but please don't hesitate to send me somewhere else if this topic has already been discussed.

       

      Ok,

       

      I created a list and an itemRenderer. it contains a checkbox and everything goes fine except for two things :

       

      Position : I can't success in aligning or centering teh checkbox regarding to the list row.

       

      Label: I can't set any even with dummy text.

       

      How can I get the checkbox well aligned ?

       

      cb.mxml

      <?xml version="1.0" encoding="utf-8"?>
      <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100" height="20">
          <mx:CheckBox label="a" fontSize="9" />
      </mx:HBox>

       

      main.mxml

      <mx:TileList columnCount="1" width="100" height="20" dataProvider="{pdfPresetsNameArrayCollection}" itemRenderer="cb" rowHeight="30" dragMoveEnabled="true" dragEnabled="true" dropEnabled="true" dragDrop="handleReorder(event)"  ></mx:TileList>

       

      Here is what I get as a result :

      checkbox.jpg

      I would like to get the checkbox nicely centered but any of the properties I try to set from x/y to verticalCenter is helpless.

       

      Thanks in advance for any inputs.

       

      Loic