Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-26-2008, 03:53 PM   #1
ms10
Registered User
 
Join Date: Apr 2008
Posts: 12
Default AdvancedDataGrid row not resizing until 2nd event

This issue follows on from a previous thread of mine, but is really a separate issue.

In my renderer I am attempting to get a TextField within an HBox within a grid's cell to wrap. I am encountering an issue where the wrapping occurs but only following the **2nd** event.

Let me explain.
If I set the column width to wrap the text over 3 rows within a single datagrid row, and then expand the column so that the text only occupies one line, then i have the issue of the row not resizing to a third of its original height. This resizing does however occur when I initiate a second event (such as adjust the column width a small amount, or sort it).

The same issue is encountered when shrinking the column width. I get one line of text redrawn to occupy 3 lines, but with only the first line in the row (and the other two in the row beneath).

the pseudocode is below:

override protected function updateDisplayList(unscaledWidth: Number, unscaledHeight: Number): void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
getColumn(_column);

_textField.width = _column.width;
var uic:UIComponent = UIComponent(_textField.parent);
uic.width = _column.width;
uic.explicitHeight = _textField.textHeight;
this.explicitHeight = _textField.textHeight;
this.height = _textField.textHeight;
}


Any help would be greatly appreciated.
Thanks,
Mark


fyi, the renderer extends HBox as I have to place a button alongside the text.

Last edited by ms10; 08-27-2008 at 08:24 AM.
ms10 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dispatching event from one class and listening in another pratikhunt ActionScript 3.0 5 07-21-2009 01:56 PM
creating separate classes for custom event frank grimes ActionScript 3.0 6 06-27-2009 10:55 PM
close() bugs in the Loader class thecaptain ActionScript 3.0 7 08-24-2007 03:26 PM
event or listener for a movieclip resizing? apotropaic ActionScript 2.0 3 09-12-2006 10:12 PM
Event handling with Listeners - learning from Java robertpenner ActionScript 1.0 (and below) 2 08-08-2001 11:36 PM


All times are GMT. The time now is 12:34 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.