You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Alex Harui (JIRA)" <ji...@apache.org> on 2014/06/22 17:19:24 UTC

[jira] [Resolved] (FLEX-23915) LabelWidth not updating properly in Forms

     [ https://issues.apache.org/jira/browse/FLEX-23915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Harui resolved FLEX-23915.
-------------------------------

       Resolution: Fixed
    Fix Version/s: Apache Flex 4.12.2

Accepted patch. 93ac51cb66e5e16ffab3c6b28c64cd153a6b2fb0

> LabelWidth not updating properly in Forms
> -----------------------------------------
>
>                 Key: FLEX-23915
>                 URL: https://issues.apache.org/jira/browse/FLEX-23915
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: mx: Form View
>    Affects Versions: Adobe Flex SDK 4.0 (Release)
>         Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Language Found: English
>            Reporter: Adobe JIRA
>            Assignee: Alex Harui
>            Priority: Trivial
>             Fix For: Apache Flex 4.12.2
>
>         Attachments: FLEX-23915.diff
>
>
> Steps to reproduce:
> In an mx:Form which contains several FormItems whose visibility depends on some logic, when hidden FormItems are displayed the width of the LabelWidth of the Form is not invalidated / recalculated thus truncating the text of the new label (if it's larger than the previously calculated). 
> Execute the app below:
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application 
>    layout="vertical" minWidth="955" minHeight="600"
>    xmlns:mx="http://www.adobe.com/2006/mxml"
>    xmlns:local="*"
>    xmlns:containers="mx.containers.*">
>    <containers:MyForm id="form"
>        width="300">
>        <mx:FormItem 
>            width="100%"
>            label="My label">
>            <mx:TextInput width="100%"/>
>        </mx:FormItem>
>        <mx:FormItem id="fi"
>            width="100%"
>            label="My label long" includeInLayout="{v.selected}"
>            visible="{v.selected}">
>            <mx:TextInput width="100%"/>
>        </mx:FormItem>
>    </containers:MyForm>
>    <mx:CheckBox id="v"/>
> </mx:Application>
>  Actual Results:
> When selecting / unselecting the checkbox, the second FormItem appears but the text is truncated. 
>  
>  Expected Results
> The label should be resized.
>   
>  Workaround (if any):
> There at least a couple of workarounds:
> 1. Invoke form.styleChanged(null). This will cause invalidateLabelWidth to be invoked
> 2. Create a subclass of mx:Form in the mx.containers package. Create a public method on it to proxy calls to invalidateLabelWidth. Invoke the public method when needed



--
This message was sent by Atlassian JIRA
(v6.2#6252)