The following example shows how you can use an HSlider control as an item renderer in a Flex DataGrid control.
Full code after the jump.
Continue reading ‘Using a Slider control as a DataGrid column item renderer in Flex’
The following example shows how you can determine when the Flex DateField control’s is opened or closed by listening for the open or close events.
Full code after the jump.
Continue reading ‘Determining when the DateField control is opened or closed in Flex’
The following example shows how you can create a simple image gallery in Flex using a Tree control and a SWFLoader control.
Full code after the jump.
Continue reading ‘Creating a simple image gallery with the Flex Tree control’
Similar to a previous example, “Creating a simple image gallery with the Flex HorizontalList control”, the following example shows how you can create a simple photo gallery in Flex using the TileList control, Image control, and the PopUpManager class.
Full code after the jump.
Continue reading ‘Creating a simple image gallery with the Flex TileList control’
This request comes to us from a faithful reader who was wondering how you can display a full image when a user clicks on a thumbnail in a HorizontalList control in Flex. My solution was to put the thumbnail image and full image URLs in the data provider and then use bindings to the HorizontalList control’s selectedItem property.
Full code after the jump.
Continue reading ‘Creating a simple image gallery with the Flex HorizontalList control’
The following example will show you how you can use a CheckBox control as a custom item renderer in a List control in Flex.
I haven’t done a lot of testing yet, so if you have any tips/suggestions/improvements, please, share them in the comments.
Full code after the jump.
Continue reading ‘Using a CheckBox control as a list item renderer in Flex’
The following example shows how you can truncate long item labels in a ComboBox control by setting a custom item renderer. In this example we’re using the Label control we’re using the Label control and taking advantage of the Label control’s truncateToFit property which truncates the string with an “…” and displays a tool tip showing the entire, non-truncated string when the truncateToFit property is set to true (which is the default value).
Full code after the jump.
Continue reading ‘Displaying item tool tips in a Flex ComboBox control’
The following example shows how you can create a simple ComboBox item renderer which displays multiline items in the ComboBox control’s drop down menu.
Full code after the jump.
Continue reading ‘Creating a custom ComboBox item renderer in Flex’
The following example shows how you can use a Label control as an item renderer in a Flex ComboBox control so that items which exceed the combo box dropdown menu’s width are truncated with a nice “…”.
Full code after the jump
Continue reading ‘Truncating labels in a Flex ComboBox dropdown menu using an item renderer’
Just a quick example I threw together last night which loads the Kuler RSS feed and displays some items in a DataGrid along with their rating and theme image (using the Flex Image control as a custom item renderer).
Full code after the jump.
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.
Full code after the jump.
Continue reading ‘Formatting a Flex DataGrid control using a custom item renderer’
This is semi-related to the previous post, but this is something I’ve wanted to do for a while now. In fact, I first started thinking about it when I did the Image color picker sample. Basically, how can you take a bitmap image of something on the Stage and then create an item renderer out of it. The answer turned out to be fairly easy (much to my surprise).
In this mini-application we look at how to take a snapshot of the video at each cue point. We then take that bitmap, and bind it to a TileList control’s data provider so our TileList shows handy video cue points, along with an HTML-formatted label of the cue point name/time/type.
Full code after the jump.
Continue reading ‘Creating FLV cuepoint thumbnails using the Bitmap and BitmapData classes’
In a previous post (Finding a pixel’s color value using the Bitmap classes and getPixel()) we looked at copying an image so we could build a simple color-picker like app. In this post, we explore duplicating a loaded image and copying it into a TileList control. Each time you press the “Copy image” button, a new instance of the source image is created and added to the TileList control’s data provider.
As an added bonus, we also create a custom item renderer consisting of an HBox container, Image control, and a Label control.
Full code after the jump.
Continue reading ‘Duplicating images using the Bitmap and BitmapData classes’