Devin Holloway: Flex CollapsiblePanel Component. Devin Holloway: Flex - Complex Form layouts with ContraintLayout. The Form container uses FormLayout, by default, to lay out its FormItem children.
FormLayout extends VerticalLayout to stack the FormItem comtainers in a vertical column. This is all well and good, assuming you want a vertically laid out form, but that's often not the case. Take the example below. Devin Holloway: Flex FormattedTextInput Component. Although I've seen this in a few applications, I've never seen this type of component available for Flex.
The idea is that when you click and bring focus in to a TextInput, it shows the raw data for editing. When the value is committed and focus leaves the TextInput, it displays a formatted version of the value. It's very similar to concept of ItemEditors and ItemRenderers in list-based component, where the editor show the raw data and the renderer shows formatted data. Kachurovskiy/Spark-Tree - GitHub. Gallery – FlexLayouts. January 7, 2011 RectangleLayout is a custom layout that arranges visual components in a rectangle along the inside border of their parent container.
For example, RectangleLayout could be used to arrange the tiles of a board game like Monopoly (but you’d need to set rotateElements="true"). More… CircleLayout is a custom layout that arranges visual components in a circle so that they fit entirely inside their parent container. Working with Native Mouse Features - For Flash Player 10.2+ in actionScript 3.0. The Flex 4 TitleWindow Component: Adding the missing features at 9MMEDIA Blog. The new Spark components included in Flex 4 are a tremendous step forward in terms of ease of skinning and extensibility, but some of them seem a little barebones out of the box.
In particular the Panel and TitleWindow components are lacking a number of features that I frequently wind up needing (and I'm guessing I'm not alone). I tackled something similar in Flex 3, when I created the BetterTitleWindow component, but I've had a few more ideas for features and I'm all about Flex 4 these days, so I thought I'd give it another go. Here's a quick rundown of all the features I added: - ability to collapse/expand- optional collapse/expand indicator- title bar or indicator clickable- ability to display a close button (which dispatches a CloseEvent)- closeButtonSkin can be specified- titleBarContent property can be used to add components to the title bar- layout of titleBarContent can be manipulated through titleBarLayout property- title bar height settable through a style property.
Slides for “Having Fun with Layouts in Flex 4″ | rialvalue.com. Toggling whether transparent pixels are clickable in a Spark Gra. The following example shows how you can toggle whether transparent pixels are clickable in a Spark Graphic container in Flex 4 by setting the mouseEnabledWhereTransparent property.
Full code after the jump. [GoogleAdsWide] View source is enabled in the following example. When the mouseEnabledWhereTransparent property is true, the transparent corner pixels in the <s:Ellipse/> object are clickable. Conversely, when the mouseEnabledWhereTransparent property is false, only the red ellipse itself is clickable. Dynamic form with validators. Displaying images in a Spark List control using a custom item re. The following example shows how you can create a simple, custom item renderer to display thumbnails in a Spark List control in Flex 4 by setting the itemRenderer property.
Full code after the jump. And the custom item renderer, skins/CustomItemRenderer.mxml, is as follows: View source is enabled in the following example. This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. Multiple selection in a spark List without the control key. The spark List component in Flex 4 allows you to select multiple items when you set allowMultipleSelection to true.
With this flag set you can select multiple items by using the control/command key. If you want to have a List that allows multiple selection, but does not require the user to hold down the control key when selecting items you can subclass List and override the item_mouseDownHandler() method. The following example demonstrates a subclass of List called CheckList that does just that: View Source This sample uses an item renderer function to use a different renderer based on if the item is a heading or not. Formatting a Flex DataGrid control using a custom item renderer. The following example formats a column in a Flex DataGrid and uses a custom item renderer to color the text red in a cell if a price is below $0.
If the item is greater than $0, the test is displayed in black. The price column is also formatted using a custom label function, which uses a CurrencyFormatter, and finally, the data grid column uses a custom sort function to properly sort numeric columns. Custom SortableList Component using Flex 4 - InsideRIA. Adding icons to the Flex ButtonBar control. The following example shows how you can add icons to the ButtonBar control in Flex.
Full code after the jump. View MXML View source is enabled in the following example. The previous example works because the the data provider has an “icon” field, and the default value for the ButtonBar control’s iconField property is “icon”. Bill White’s Blog » Core Flex 4 – Elements vs Children. When I started using Flex 4 I tried to get up to speed by using the new version in a manner similar to its predecessor until I came across roadblocks or when I determined I was able to take advantage of the new features I had heard about such as skinning, states, etc.
I quickly found that there were some obvious Flex questions that I was not able to answer without diving into the API docs and by playing with some examples so I could truly understand what is going on. I knew from past experience that Halo was hiding a lot of the dirty details about what was going on in the display list, but once you start using Spark, you will come to see just how much Halo was really doing under the covers and why Spark is a much more ‘honest’ way of working with the display list.
One of the first things I hit was the term ‘elements’. What is an element? Making custom layout for solar planets list with Flex 4. Why not create some kind of List control which represents planets from our Solar System? In their natural layout with orbits, Sun, rotation etc. It will be much more funny than just usual list even with custom item renderers.