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
_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.
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.