textfield documentation autoheight

  • Autoheight doesn't appear to do anything. I've doublechecked the installed textfield.swf plugin.
    The correct attribute is autosize

    Also for the new textfield, autoheight, it has a new behavior.
    I was setting it to -1 , set the input, and reading out the height when it changed so that I can resize its container.
    However, now it can change with a step in between, if they final height is 100, it may have gone to 16 before its finished. This prevents me from discovering when its finished and created an erratic race condition.
    Usually, I read out the correct height, but it's not 100%.

    Also, setting autosize true, from false causes the plugin to resize correctly, however, the height attribute is never upadated until the input changes.

  • Hi,

    the new 'autoheight' setting is internally just an new (boolean) setter/getter for the old 'autosize' setting,

    the valid values for 'autosize' were (always) just 'none', 'left', 'center' or 'right' but 'left', 'center' or 'right' always had the same effect in the textfield usage case, so I thought a boolean value with just 'true' or 'false' values would be better and easier to use (btw - the 'autosize' setting is still there for backward compatibility)

    Quote

    Also for the new textfield, autoheight, it has a new behavior.
    I was setting it to -1 , set the input, and reading out the height when it changed so that I can resize its container.
    However, now it can change with a step in between, if they final height is 100, it may have gone to 16 before its finished. This prevents me from discovering when its finished and created an erratic race condition.
    Usually, I read out the correct height, but it's not 100%.

    sorry, but here I really don't understand what you mean - 'setting to -1' ...

    best regards,
    Klaus

  • Interesting.
    my autosize was always true.
    I see what happened.
    If there was an autosize set autoheight is ignored.
    I was testing using the console.
    Setting to -1 was my attempt at discovering when autoheight was complete. If I noticed a change from -1, I assumed it was complete. I have a container that is +x pixels height my textfield so it was important to know when the textfield had arrived at the final height in order to make the frame. On the new textfield, it can go from -1 to 16 to its final size of 40 and if the delayedcall loop happens to catch it at 16 height the frame is off. So now, I'm just waiting more time before I start to check height, however I assume a slower cpu or a textfield filled with complicated content may still fail this threshhold.

  • Hi,

    my autosize was always true.

    'true' was never a documented setting for autosize, but has 'failsafe' it was handled like autosize=left in Flash (see the included textfield.as).


    If there was an autosize set autoheight is ignored.

    No, both setting are working, the autoheight setting is just a setter/getter for autosize setting - that means when setting the autoheight setting to true, the autosize setting will be automatically set to 'center', and when setting to false, then to 'none'.


    Setting to -1 was my attempt at discovering when autoheight was complete. If I noticed a change from -1, I assumed it was complete. I have a container that is +x pixels height my textfield so it was important to know when the textfield had arrived at the final height in order to make the frame. On the new textfield, it can go from -1 to 16 to its final size of 40

    okay, I will try to add an dedicated event for that case, e.g. maybe some like 'onhavesize' or just 'onresize'...

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!