30
Oct
08

Flex 3 and Form container layout issues

Kinda taking off from where I was at in this old post of mine, I’m now having some issues with how Flex does it’s calculations for the vertical scrollbar. Specifically when using a TabNavigator component that has Form components as it’s children. Here’s some of the code:

<mx:TabNavigator id="tabbar" right="340" left="10" top="95" bottom="10">
	<mx:Form indicatorGap="5" verticalGap="10" label="1. Personal Details">
		<mx:FormItem label="First Name:">
			<mx:TextInput id="firstName" />
		<mx:FormItem>
		.
		.
		.
		<mx:FormItem label="Phone Number:">
			<mx:TextInput id="phoneNumber" />
		<mx:FormItem>
	</mx:Form>
</mx:TabNavigator>

The problem is no matter what I tell the TabNavigator to be height wise (either with a height percentage or a constraint based amount) the Form when it has too much content in it will create an application wide vertical scrollbar. I’m trying to make it so that the scrollbar is relative to the actual TabNavigator, so it appears alongside that content. I’ve read through the Adobe documentation about containers and layouts but that didn’t really shed any light on the subject (or my issue at least).

Placing the Form inside a Canvas tag solves the issue, but I’d like to think I can get the Form working as I think it should be.

Has anyone got any pearls of wisdom regarding the issue I’m experiencing?

Share and Enjoy:
  • del.icio.us
  • Digg
  • Fark
  • Google
  • NewsVine
  • Slashdot
  • StumbleUpon
  • Technorati
  • Yahoo! Buzz

4 Responses to “Flex 3 and Form container layout issues”


  1. 1 Zachary Schneider Jan 21st, 2009 at 2:47 pm

    I have the same problem with dynamically adding components to a VBox inside a tabNavigator.
    Diving into the source to see what the story is.

  2. 2 Zachary Schneider Jan 21st, 2009 at 3:18 pm

    Well this property solved my issue: resizeToContent (set to true)

  3. 3 Jason Langdon Jan 21st, 2009 at 3:47 pm

    Am I correct in saying that that property is only available for the Accordion component?

  4. 4 Vajahat Ali Feb 20th, 2009 at 12:58 pm

    Ya it helped me
    Regards,
    Ali Vajahat
    Software Engineer
    Lahore Pakistan

Leave a Reply




Categories

Recent Comments

Posts this month

October 2008
M T W T F S S
« Sep   Nov »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Archives