Archive for August 15th, 2007

15
Aug

Sorting an XMLListCollection using the mx:Sort and mx:SortField MXML tags

I actually searched around and couldn’t find any other examples of this, but here is a quick example of using the <mx:Sort /> and <mx:SortField /> MXML tags in Flex to sort an XMLListCollection.

Full code after the jump.

Continue reading ‘Sorting an XMLListCollection using the mx:Sort and mx:SortField MXML tags’

15
Aug

Locking columns in a horizontally scrolling DataGrid control

The following is an example of locking a fixed number of columns in a horizontally scrolling DataGrid control. Although this tip probably has little to no use if all your data fits comfortably in a data grid, it can be invaluable if you have a lot of columns and need to scroll horizontally as well as vertically.

Full code after the jump.

Continue reading ‘Locking columns in a horizontally scrolling DataGrid control’

15
Aug

Preventing a user from deselecting dates in a DateChooser control

Here’s an example which prevents users from deselecting a date in the Flex DateChooser control by Ctrl-clicking on the date. By listening for the DateChooser control’s change event, and if the currently selected date is null, we set the selected date to the previously selected date. Also, for no good reason, I added a List control which lets you disable certain dates in the calendar.

Full code after the jump.

Continue reading ‘Preventing a user from deselecting dates in a DateChooser control’

15
Aug

Creating tool tips manually using the ToolTipManager class

Here’s a basic example of creating a text tool tip using the Flex ToolTipManager class and making the tool tip follow the mouse cursor.

Full code after the jump.

Continue reading ‘Creating tool tips manually using the ToolTipManager class’