Maybe just as a test, try to purposefully hardcode the height of the VBox to 
some large value in commitProperties() and then invalidateProperties() in the 
setter for data?  You might have to invalidateDisplayList() as well. I've run 
into this rendering problem a lot myself and have yet to find a good solution 
that consistently works.  Let us know if you find a solution.

Sydney




________________________________
From: Dale Bronk <[email protected]>
To: [email protected]
Sent: Fri, January 8, 2010 2:01:59 PM
Subject: RE: [AFFUG Discuss] Datagrid itemRenderer help please

 
One other piece of information…  When I scroll the DataGrid, it
will correctly reset the size for the Renderer when the row leaves the screen
and scroll back in view.
 
From:Dale Bronk
[mailto:[email protected]] 
Sent: Friday, January 08, 2010 1:59 PM
To: [email protected]
Subject: RE: [AFFUG Discuss] Datagrid itemRenderer help please
 
Yep, forgot to mention that. 
 
From:[email protected]
[mailto:[email protected]] On Behalf Of Justin Nichols
Sent: Friday, January 08, 2010 1:46 PM
To: [email protected]
Subject: Re: [AFFUG Discuss] Datagrid itemRenderer help please
 
Do you have variableRowHeight="true" on the DataGrid?
 
Thanks,
 
Justin Nichols
 
On Jan 8, 2010, at 1:41 PM, Dale Bronk wrote:
 
I have a pretty simple
datagrid.  It has a single column in which we have an
itemRenderer that that will display the column in different ways depending
on the type of object to display.  Pretty simple and working fine except
for
resizing.

One of the renderer states is a simple VBox with the contents as follows:

            <mx:FormItem label="Event Section:"
id="formitem1" width="100%"
labelStyleName="itemLabel">
                        <mx:Text id="eventSection" width="100%" />
            </mx:FormItem>
            <mx:FormItem label="Form Name:" id="formitem2"
width="100%"
labelStyleName="itemLabel">
                        <mx:Text id="formName" width="100%" />
            </mx:FormItem>
            <mx:FormItem label="Field Name:" id="formitem3"
width="100%"
labelStyleName="itemLabel">
                        <mx:Text id="fieldName" width="100%" />
            </mx:FormItem>
            <mx:Text id="message" width="100%" />
            <mx:Spacer height="3" />

The renderer (VBox) is set to w/h = 100%.  We have scroll policies turned
off on the VBox and want each VBox to be the size needed to display the
data..  Our DataGrid UI has a toggle button for small size and large size.
In large size everything works fine because there is no wrapping of the
Text..  But when in small mode a couple of the Text controls will wrap as
we
want them to, but the VBox does not resize (or the DataGridColumn) and we
have text that goes off the bottom of the renderer.

I've tried invalidateDisplayList() and invalidateList() on the DataGrid as
well as placing invalidateDisplayList() and invalidateSize() in the renderer
set data function.

Any advice or push in the right direction would be appreciated.

Thanks,
Dale




-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------
 
------------------------------------------------------------- 
To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line 

For more info, see http://www.affug.com 
Archive @ http://www.mail-archive.com/discussion%40affug.com/ 
List hosted by FusionLink 
------------------------------------------------------------- 





-------------------------------------------------------------

To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line



For more info, see http://www.affug.com

Archive @ http://www.mail-archive.com/discussion%40affug.com/

List hosted by http://www.fusionlink.com

-------------------------------------------------------------

Reply via email to