You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by amadese <pl...@msn.com> on 2015/02/05 11:55:36 UTC

FLEX - FormItem - Space still present when content not visible

Hi,

I'm a beginner with Flex. I would like to hide several fields in a form
under conditions. I have tried to use the property "visible" and all is
working perfectly. Nevertheless, spaces are still displayed in the form when
these fields are hidden... And I do not know how to delete them. I thought
to build a function in order to do that (reduce the height to 0 of the
formItem for example when the field has to be hidden), but I do not know how
to implement this feature and how to use it in the code.

<mx:FormItem label="Mandatory:" width="100%" 
	required="{user &amp;&amp; user.isCSB()}" 
	visible="{user.isAdministrator() }">
		<s:HGroup width="100%" horizontalAlign="left" verticalAlign="middle" 
			visible="{user.isAdministrator() }">
				<haloforfx4:DropDownList 
					id="cob_prio"				
					labelField="number"							
					width="100"
					prompt="{Const.PROMPT_SELECT}"
					change="model.grant.prio =
(cob_prio.selectedItem?cob_prio.selectedItem.id:-1)"											
					dataProvider="{model.prioritiesList.items}"
					selectedItem="@{model.currentPriority}"
					enabled="{grant!=null &amp;&amp; (user.isAdministrator()}"
					visible="{grant!=null &amp;&amp; (user.isAdministrator() }"	
				/>	
		</s:HGroup>
</mx:FormItem>

Could you please help me?

Thank you in advance,



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FLEX-FormItem-Space-still-present-when-content-not-visible-tp44961.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: FLEX - FormItem - Space still present when content not visible

Posted by amadese <pl...@msn.com>.
Many thanks, it works now.

Sebastien



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FLEX-FormItem-Space-still-present-when-content-not-visible-tp44961p44965.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: FLEX - FormItem - Space still present when content not visible

Posted by antonio esposito <an...@gmail.com>.
Try this.

includeInLayout="true/false"

 Antonio

2015-02-05 11:55 GMT+01:00 amadese <pl...@msn.com>:

> Hi,
>
> I'm a beginner with Flex. I would like to hide several fields in a form
> under conditions. I have tried to use the property "visible" and all is
> working perfectly. Nevertheless, spaces are still displayed in the form
> when
> these fields are hidden... And I do not know how to delete them. I thought
> to build a function in order to do that (reduce the height to 0 of the
> formItem for example when the field has to be hidden), but I do not know
> how
> to implement this feature and how to use it in the code.
>
> <mx:FormItem label="Mandatory:" width="100%"
>         required="{user &amp;&amp; user.isCSB()}"
>         visible="{user.isAdministrator() }">
>                 <s:HGroup width="100%" horizontalAlign="left"
> verticalAlign="middle"
>                         visible="{user.isAdministrator() }">
>                                 <haloforfx4:DropDownList
>                                         id="cob_prio"
>                                         labelField="number"
>                                         width="100"
>                                         prompt="{Const.PROMPT_SELECT}"
>                                         change="model.grant.prio =
> (cob_prio.selectedItem?cob_prio.selectedItem.id:-1)"
>
> dataProvider="{model.prioritiesList.items}"
>
> selectedItem="@{model.currentPriority}"
>                                         enabled="{grant!=null &amp;&amp;
> (user.isAdministrator()}"
>                                         visible="{grant!=null &amp;&amp;
> (user.isAdministrator() }"
>                                 />
>                 </s:HGroup>
> </mx:FormItem>
>
> Could you please help me?
>
> Thank you in advance,
>
>
>
> --
> View this message in context:
> http://apache-flex-development.2333347.n4.nabble.com/FLEX-FormItem-Space-still-present-when-content-not-visible-tp44961.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
>