Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AutoSizing Flex Mobile spark textarea component

I want to make my mobile spark textarea component to wrap all content. I found out mx_internal way of doing this but I'm not able to call mx_internal::getTextField().numLines method - there's no such... Anybody who has done this before?

like image 263
Zaur Guliyev Avatar asked May 16 '12 12:05

Zaur Guliyev


1 Answers

Here is a solution for mobile:

for(var i:int=0; i < StyleableTextField(txt_genel.textDisplay).numLines; i++) {
        ta_height += StyleableTextField(txt_genel.textDisplay).getLineMetrics(i).height;
}
txt_genel.height = ta_height;
like image 164
Zaur Guliyev Avatar answered Oct 20 '22 03:10

Zaur Guliyev