[flexcoders] Re: Accurate way of measuring a datagrid

2009-06-22 Thread valdhor
I have never found one that is reliable. What I have had to resort to is doing my own counting of lines as I go then multiplying that by line height, adding in various padding numbers, sacrificing a chicken and hoping for the best. --- In flexcoders@yahoogroups.com, "djhatrick" wrote: > > Lu

[flexcoders] Re: Accurate way of measuring a datagrid

2009-06-19 Thread djhatrick
Lulz thanks for the that! I must be tired ... but i got this to work, correctly, I have multiple rows that can be longer than others, so this was my error... By the way, is there an event I can subscribe to that will tell me when everything is rendered, or do i have to rely on my trusty time

[flexcoders] Re: Accurate way of measuring a datagrid

2009-06-19 Thread Tim Hoff
If you can't get it to work, you could always use a Repeater instead. In this case, since you want to display all of the items, this would probably work out better. -TH --- In flexcoders@yahoogroups.com, "Tim Hoff" wrote: > > > Yeah, maybe not. Good luck; this is a common challenge that many h

[flexcoders] Re: Accurate way of measuring a datagrid

2009-06-19 Thread valdhor
I hate to be picky but my math makes it 52. Anyway, did you count things like padding, vertical gap etc? --- In flexcoders@yahoogroups.com, "djhatrick" wrote: > > Tom: > > Thanks for that, but unfortunately that method is inaccurate( Maybe it > doesn't work for very good for factories... Here

RE: [flexcoders] Re: Accurate way of measuring a datagrid

2009-06-18 Thread Alex Harui
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of djhatrick Sent: Thursday, June 18, 2009 2:42 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Accurate way of measuring a datagrid Tom: Thanks for that, but unfortunately that method is inaccurate( Ma

[flexcoders] Re: Accurate way of measuring a datagrid

2009-06-18 Thread Tim Hoff
Yeah, maybe not. Good luck; this is a common challenge that many have not been successful solving. -TH --- In flexcoders@yahoogroups.com, "djhatrick" wrote: > > Tom: > > Thanks for that, but unfortunately that method is inaccurate( Maybe it doesn't work for very good for factories... Here's ho

[flexcoders] Re: Accurate way of measuring a datagrid

2009-06-18 Thread djhatrick
Tom: Thanks for that, but unfortunately that method is inaccurate( Maybe it doesn't work for very good for factories... Here's how i am getting my height, i am setting a height on my value object after i add my labels in a vertical column, then i listen for an event on my collection dataProvide

[flexcoders] Re: Accurate way of measuring a datagrid

2009-06-18 Thread Tim Hoff
Hi Patrick, private function resizeDataGrid():void { myDataGrid.height = myDataGrid.measureHeightOfItems(0, myDataGrid.dataProvider.length) + myDataGrid.headerHeight + 2; } -TH --- In flexcoders@yahoogroups.com, "djhatrick" wrote: > > My datagrid won't measure correctly, i have variabl