Get flash to fully experience Pearltrees
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.
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.
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.
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
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. The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see http://www.adobe.com/products/flex/ . To download the latest nightly build of the Flex 4 SDK, see http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4 . For more information on getting started with Flex 4 and Flash Builder 4, see the official Adobe Flex Team blog .
Problem You want to create more agile forms, and configure the validators to integrate dynamically into the field from a data source. Solution Initially write a class event to execute when creating the fields complete the creation, it will be set up and validation of the field, then write a class extending the class TextInput added the event created, create a class based on the Form to receive the settings in the form of only one variable, write a MXML nesting fields in a Repeater inside the FORM tag that you customized.
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. The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see http://www.adobe.com/products/flex/ . To download the latest nightly build of the Flex 4 SDK, see http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4 .
Home > Flex 4 > 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
For HTML5, CSS3, and jQuery examples, see dHTMLExamples.com The HelloBar - a little bar that gets noticed! Close Open
About You have arrived at this page because InsideRIA is no longer an active website, as of January 31, 2011. While we're sad to see the change, we think you will find the resources and community here at oreilly.com helpful. An archive of the material previously posted on InsideRIA can be found at DevelopRIA.com . O'Reilly Answers is an excellent resource for getting information about everything technology related.
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”.
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?
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.