Flex4 container

Flex4 container

Hi...

I have a custom component that is larger than a certain container, and I need it to be centered in that container. Best using only MXML, styles and properties

This does not work as expected:

<s:BorderContainer x="300" y="300" width="200" height="200">
   <s:Button label="Not centered" horizontalCenter="0" verticalCenter="0" width="300" height="250"/>
</s:BorderContainer>

Thanks

View Answers

October 29, 2010 at 4:42 PM

Ans:

I noticed that using the whole Application as the Container in the example, the Component would center itself even when larger than the Stage. I cannot use another Application, so I used the next inherited class: SkinnableContainer, instead of BorderContainer, in the above example. It works properly.

Thanks









Related Tutorials/Questions & Answers:
Flex4 container
Flex4 container   Hi... I have a custom component that is larger than a certain container, and I need it to be centered in that container. Best... noticed that using the whole Application as the Container in the example
Flex4
Flex4  Hi...... please tell me about that..... What?s new in flex4?ADS_TO_REPLACE_1 Thanks   Ans: The Flex SDK has been focused around...-cases. There are top 10 changes in flex4. Integration with Adobe Catalyst Spark
Advertisements
Flex4
Flex4  Hi.. What is the difference between Flex3 and Flex4? Please tell me about that......ADS_TO_REPLACE_1 Thanks   Difference between Flex3 and Flex4: Adobe Flex 4 including a new skinning and component
WindowedApplication Container in Flex4
WindowedApplication container in Flex4: The WindowedApplication container is an application container which is use to create Flex applications for AIR. The WindowedApplication container is used in desktop and window based applications
Spark Application Container in Flex4
Spark Application Container in flex4: Spark container is define in the spark.components package. The application container is the first container of the spark components. Basically it is layout container. you can start adding
SkinnableDataContainer in Flex4
SkinnableDataContainer in Flex4: SkinnableDataConatiner Container is a Flex4 container hold and lays out data items and supports virtualization.  SkinnableDataContainer Container contains only these component which implement 
Tile Layout Container in Flex4
Tile Layout Container in Flex4: The Tile Layout Container is a MX container... Container control in Flex4. Output: Running Application... use 4 components in a Tile container Flex arrange two components wide and two
Window Container in Flex4
Window Container in Flex4 : This container are use window applications in flex 4. Spark Window container is provide a way if user want to create own window... can see how to create Window container in Flex4. The MXML tag for creating
VBox Container in Flex4
VBox container in Flex4: The VBox container is a MX component. There is no Spark Component. The VBox container is used for vertical layout in which... instead of VBox Container. The tag of VBox Container is <mx:VBox>
Form Layout Container in Flex4
Form Layout Container in Flex4: The Form Layout container is a MX container. There is no Spark equivalent. Flex uses the Form Layout container for making... a Form Layout Container control in Flex4. Output: ADS_TO_REPLACE_33 Running
NavigatorcontentContainer in Flex4
NavigatorContent Container in Flex4: The NavigatorContent Container is a Flex4 container that's used to switch between multiple children which are other... have create a NavigatorContent container. A NavigatorContent must
HBox Container in Flex4
HBox container in Flex4: The HBox container is a MX component. There is no Spark Component. The HBox container is used for horizontal layout in which... Horizontal layout instead of HBox Container. The tag of HBox Container is <mx
HDivideBox Container in Flex4
HDividedBox container in Flex4: The HDividedBox container is a MX component. There is no Spark Component. The HDividedBox container is used for horizontal.... It is similar to a HBox container, except the HDividedBox container contains
VDividedBox Container in Flex4
VDividedBox container in Flex4: The VDividedBox container is a MX component. There is no Spark Component. The VDividedBox container is used for vertical.... It is similar to a VBox container, except the VDividedBox container contains a divider
Grid Layout Container in Flex4
Grid Layout Container in Flex4: The Grid Layout Container is a MX container... you can see how we can use a Grid Layout Container control in Flex4. Output... in a row and each cell can have a Grid container. The default Horizontal and Vertical
Panel Container in Flex4
Panel container in Flex4: A Panel container can contain many components. ... children components. It also contains a sub panel container according to requirement. The tag of Panel container is <s:Panel>. The default size of panel
Canvas Layout Container in Flex4
Canvas Layout Container in Flex4: The Canvas layout Container is used... or controls. The Canvas layout Container is a MX component. There is no spark component... of Canvas Layout Container is <mx:Canvas>. In this example the colored area
DividedBox Container in Flex4
DividedBox container in Flex4: The DividedBox container is a MX component. There is no Spark Component. The DividedBox container is used for both... for horizontal and vertical layout. It is similar to a Box container, except
Group Container in Flex4
Group container in Flex4: The Spark Group containers take any components...) you can use Group container. The Group container is designed for simplicity... of the Group container. You can use Horizontal and Vertical layout with Group
Box Container in Flex4
Box container in Flex4: The Box container is a MX component. There is no Spark Component. The Box container is used for both horizontal and vertical... and vertical layout. The tag of Box Container is <mx:Box>. In this example you can
Spark DataGroup Container in Flex4
Spark DataGroup Container in Flex 4: DataGroup container is a Spark container... as children. These container uses item renderer that provide visual representation of the data item in the container. Item renderer converts data item in the format
Accordion Navigator Container in Flex4
Accordion Navigator Container in Flex4: The Accordion Navigator container... container in Flex4. Example: <?xml version="1.0" encoding... Container Example" width="365" height="419" color="
Flex4 FXG and Image
Flex4 FXG and Image  Hi.... Flex4 skin in FXG or image which is more efficient? please tell me about that...ADS_TO_REPLACE_1 Thanks   Ans: Is your app going to be scaled? If not use bitmaps or vectors cached
Label in Flex4
Label in Flex4: In Flex4 Label is a lightweight and low level UI-component that is known as Spark Component in FLex4. Spark Label is used for rendering one or more lines of uniformly-formatted text. Label in Flex4 utilize the new
Spinner in Flex4
Spinner control in Flex4: Flex4 introduced a new a Spinner control which was not available in MX. In Flex4 Spinner control is called a Spark component. You can set the values and select the values by clicking up and down button
ViewStack in Flex4
ViewStack Container in Flex4: The ViewStack container is called Spark ViewStack container. It is made up of a collection of child containers. The child... a ViewStack container in Flex4. Output: Running Application
ComboBox in Flex4
ComboBox in Flex4: In Flex4 Combobox is called a spark Combobox control. DropDownListBase control is the base class of the combobox control. Combobox...:String>ADS_TO_REPLACE_5 <fx:String>FLEX4</fx:String> </mx
RichText in Flex4
RichText in Flex4: In Flex4 RichText Control is a Spark Control and it is a middleweight Component. The text shown in richly-formatted text, with multiple character and paragraph formats. It is not a interactive component because
TextArea in Flex4
TextArea Control in Flex4: The TextArea control is a component of both the MX... Components while developing any program in Flex4. The characteristics of MX... in Flex4. The characteristics of MX TextArea control is a multilinear
SkinnableContainer in Flex4
SkinnableContainer in Flex4: The SkinnableContainer container is a Flex container that hold components as children. It contain only those components... components. If user want to use this container by using <s
RicheditableText in Flex4
RichEditableText in flex4: In Flex4 the RichEditableText control is just like a RichText control in which the text display in richly-formatted text, with multiple character and paragraph formats. It is a interactive component
Slider in Flex4
Slider control in Flex4: Flex4 Slider control is also called a Spark Slider control. You can select a value by moving a slider thumb between two end... In this example you can see how we can use a Slider control in Flex4. Output
Java container
Java container  What is a Container in a GUI
servlet container
servlet container  What is servlet container
PopUpAnchor Control in Flex4
PopUpAnchor Control in Flex4: The PopUpAnchor control is a Spark component. This new component added in Flex4. The PopUpAnchor control is used to a pop-up component in a layout. The pop-up component has no visual appearance
RadioButton in Flex4
RadioButton in Flex4: In Flex4 RadioButton is a spark component. You can use two or more RadioButton components with in a RadioButtonGroup and select only one RadioButton at one time and if one stands in selected mode then all
java container
java container  Why the container does not support multiple layout managers
Spark BorderContainer in Flex4
Spark BorderContainer in flex4: It is a spark container in Flex 4. If user... of the content area then Flex 4 provide a container for this requirement Flex defines the Spark BorderContainer container as a subclass of the SkinnableContainer
TitleWindow in Flex4
TitleWindow in Flex4: Spark TitleWindow is a layout container that is created by used pop-up window. The TitleWindow container have a content area for own... working to close this TitleWindow. If user want to a container that drag around
servlet container
servlet container  When a client request is sent to the servlet container, how does the container choose which servlet to invoke?   The servlet container determines which servlet to invoke based on the configuration
Spark Container in Flex 4
Spark Container in flex4: The container provides content area that contains its child component. The size of the content area is set by the container. If you want to create a application then you require at least one container
Accordian container
Accordian container  Hi.. How to customize accordian and panel look? ThanksADS_TO_REPLACE_1   Ans: You can use the stylesheet or creating custom skin. Custom skin is the only way to make a component or container
Spark BorderContainer Properties in Flex4
Spark BorderContainer Properties in flex4: Spark BorderContainer ... property then container dismiss the style properties like backgroundAlpha.... If you define borderStroke property for the BorderConatiner the container
container
ToolTip with ViewStack in Flex4
ToolTip with ViewStack in Flex4: In this example you can see how we can use the tooltip with ViewStack container. You will use ToolTips on child elements in a navigator container?s data provider.  The component recognizes those
What is Spring IOC Container ?
What is Spring IOC Container ?  Hi, What is Spring IOC Container ? Thanks
ModuleNotFoundError: No module named 'container'
ModuleNotFoundError: No module named 'container'  Hi, My Python... 'container' How to remove the ModuleNotFoundError: No module named 'container' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'in-container'
ModuleNotFoundError: No module named 'in-container'  Hi, My Python... 'in-container' How to remove the ModuleNotFoundError: No module named 'in-container' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'container'
ModuleNotFoundError: No module named 'container'  Hi, My Python... 'container' How to remove the ModuleNotFoundError: No module named 'container' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'in-container'
ModuleNotFoundError: No module named 'in-container'  Hi, My Python... 'in-container' How to remove the ModuleNotFoundError: No module named 'in-container' error? Thanks   Hi, In your python

Ads