The verticalGap may get ignored with cellRenderers, I can’t remember.  Try adjusting your Canvas instead to have the gap, maybe use a VBox with margins instead?

 

Matt

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Greg Morphis
Sent: Wednesday, November 02, 2005 12:10 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Gaps between list items

 

Hiya,

When using cellrenderer to populate a list ex:
      <mx:List width="100%"
                  height="100%"
                  borderStyle="none"
                  rowHeight="25"
                  marginLeft="30"
                  marginRight="30"
                  textAlign="center"
                  verticalGap="100"
                  id="acts"
                  dataProvider="{ myDP }"
                  labelField="activity"
                  rollOverColor="0xFFFFFF"
                  selectionColor="0xFFFFFF"
                  initialize="AddActivityViewHelper.getActivities()"
                  change="mx.core.Application.alert(event.target.selectedItem.color)"
                  cellRenderer="com.alltel.rapid.aopscheduler.view.ActivityCellRenderer"
                  dragEnabled="true">
      </mx:List>


I cannot seem to get the verticalGap to work.
The cellRenderer is pretty plain...

<?xml version="1.0" encoding="UTF-8"?>

<mx:Canvas xmlns:mx="http://www.macromedia.com/2003/mxml" height="49"
width="100%" >
     
      <mx:Script>
      <![CDATA[
            function setValue( str:String, item:Object, sel:Boolean ) {
                 
                  this.d.text = item.activity;
                  this.setStyle("backgroundColor", item.color);
            }
      ]]>
      </mx:Script>


      <mx:Text id="d"
                  height="100%"
                  width="100%"
                  marginTop="5"
                  marginBottom="5"
                  fontSize="12"
                  fontWeight="bold"
                  selectable="false"/>
</mx:Canvas>


Everything I try to put a small gap fails. Can someone offer any suggestions?

Thanks!


--
Auxilium meum a Domino



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to