This content has been marked as final. Show 7 replies
Is the resize in reponse to a browser resize, or can you resize the grid directly?
no, this is one of the elements inside the grid resizing, ie a text field that has new content, and as a result should change the size and position of the rows around it.
Can the user edit the content of the textfield? If not, you might want to use a Text component and use the resize event.
As a follow up, the resize event is defined by UIComponent, so it is available on most components.
Thanks for the replies, the resize event would do the trick. However, this is a pure ActionScript project (no Flex items), so I don't think I can use mx.controls.Text without invoking a huge amount of Flex overhead? (the project currently builds to 10k...)
Is there a solution which doesn't use the UIComponent, or a way i could use the Text class inside a pure ActionScript project? Oh and no, the text item is not editable by the user, if that helps.
I don't know the answer, but in case you don't know about it, I thought I would mention the "-keep" trick. By adding "-keep" to the "Additional Compiler Arguments" field of Flex Builder (or just putting it on the command line if compiling directly with mxmlc), you are telling the compiler to write out all of its temporary files. This includes .as files which were generated from .mxml files.
So one thing you could try is, make a simple Flex app (with .mxml) that does what you want, and then examine the output .as file to see how the Flex framework does it.
ah that's a great idea, i will look into that! thank you very much for the tip.
back on the subject of the resizing issue, i'm currently thinking of limiting it to text fields, and putting get and set methods around the text property in TextField, which when called calls a custom event that something else is listening for, which then adjusts the sizes... of course this doesn't pick up other changes (eg text style or font size changing the size), maybe i could put get and set around width and height and call resize that way?
as you can see i'm still looking for a good solution, anyone who can help on this, please suggest something! :)