The following example shows how you can change the direction of a FormItem container in Flex by setting thedirection property to "horizontal" or "vertical". FormItem { labelStyleName: myFormItemLabelStyleName; } .myFormItemLabelStyleName { fontWeight: bold; } source="{Icons.AIR_ICON}" toolTip="Adobe AIR" /> source="{Icons.FLASH_ICON}" toolTip="Adobe Flash" /> source="{Icons.FLASH_PLAYER_ICON}" toolTip="Adobe Flash Player" /> source="{Icons.FLEX_ICON}" toolTip="Adobe Flex" /> source="{Icons.AIR_ICON}" toolTip="Adobe AIR" /> source="{Icons.FLASH_ICON}" toolTip="Adobe Flash" /> source="{Icons.FLASH_PLAYER_ICON}" toolTip="Adobe Flash Player" /> source="{Icons.FLEX_ICON}" toolTip="Adobe Flex" />
/** http://blog.flexexamples.com/2008/03/18/changing-t he-layout-direction-of-a-form-item-in-flex/ */ package { [Bindable] public class Icons { public function Icons() { } [Embed("assets/air_appicon-tn.gif")] public static var AIR_ICON:Class; [Embed("assets/fl_appicon-tn.gif")] public static var FLASH_ICON:Class; [Embed("assets/fl_player_appicon-tn.gif")] public static var FLASH_PLAYER_ICON:Class; [Embed("assets/fx_appicon-tn.gif")] public static var FLEX_ICON:Class; } }
/** http://blog.flexexamples.com/2008/03/18/changing-t he-layout-direction-of-a-form-item-in-flex/ */ package { [Bindable] public class Icons { public function Icons() { } [Embed("assets/air_appicon-tn.gif")] public static var AIR_ICON:Class; [Embed("assets/fl_appicon-tn.gif")] public static var FLASH_ICON:Class; [Embed("assets/fl_player_appicon-tn.gif")] public static var FLASH_PLAYER_ICON:Class; [Embed("assets/fx_appicon-tn.gif")] public static var FLEX_ICON:Class; } }
本文介绍如何通过设置direction属性来改变Flex中FormItem容器的方向,包括水平和垂直两种布局方式,并提供具体代码示例。
1569

被折叠的 条评论
为什么被折叠?



