Hi Warren,
Item Renderers and their layout are separate from the List. See the following
example:
List:
<j:List localId="myList" y="180" x="250" width="200"
dataProvider="{simple2}" itemRenderer="path.to.itemRenderer">
<j:beads>
<j:ListPresentationModel rowHeight="13" variableRowHeight="false" />
</j:beads>
</j:List>
Item Renderer:
<j:ListItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:js="library://ns.apache.org/royale/basic"
xmlns:j="library://ns.apache.org/royale/jewel">
<fx:Script>
<![CDATA[
[Bindable("dataChange")]
public function get myObject():SomeObject
{
return data as SomeObject;
}
]]>
</fx:Script>
<j:beads>
<js:ItemRendererDataBinding/>
<js:Paddings paddingLeft="3" paddingRight="3" paddingTop="0"
paddingBottom="0"/>
<j:VerticalLayout itemsHorizontalAlign="itemsCenter" />
</j:beads>
<j:Label text="{myObject.label}"/>
</j:ListItemRenderer>
________________________________
From: wkoch <[email protected]>
Sent: Friday, October 23, 2020 8:55 AM
To: [email protected] <[email protected]>
Subject: Re: [EXTERNAL] Re: Styling a Royale List
I tried. And failed. The padding bead worked but it only controls the
padding around all the items in the list, not the items in the list. I'm
sure I have to do something in CSS but I don't know where.
<j:List localId="myList" y="180" x="250" width="200"
dataProvider="{simple2}" >
<j:beads>
<j:ListPresentationModel rowHeight="13" variableRowHeight="false" />
<b:ItemRendererDataBinding/>
<b:Paddings paddingLeft="3" paddingRight="3" paddingTop="0"
paddingBottom="0"/>
<j:VerticalLayout gap="0"/>
</j:beads>
</j:List>
--
Sent from: http://apache-royale-users.20374.n8.nabble.com/