Archive for August 23rd, 2007

23
Aug

Toggling a Flex container’s visibility

The following example shows a pretty crude method for toggling a container’s visibility and removing it from the Flex application layout. Mind you, this probably isn’t the preferred/recommended method of doing this (I imagine using states would be a lot nicer/cleaner) but hey, I’ll have to save that method up for another entry.

Full code after the jump.

Continue reading ‘Toggling a Flex container’s visibility’

23
Aug

Setting the DateChooser control’s dayNames property and firstDayOfWeek property

This is kind of silly, but I was looking through the DateBase class today and figured “why not?”. This example takes a quick look at setting the DateChooser control’s dayNames property and switching between the default values (”S”, “M”, “T”, …, “S”) with the longer versions such as “Sun”, “Mon”, “Tue”, …, “Sat”, and the longer/sillier still “Sunday”, “Monday”, “Tuesday”, …, “Saturday”.

The one interesting thing to note in this example though, is even though you can change the firstDayOfWeek property to control the day first of the week that the calendar starts on, the dayNames array should always start with Sunday.

Full code after the jump.

Continue reading ‘Setting the DateChooser control’s dayNames property and firstDayOfWeek property’

23
Aug

Determining a DataGridColumn object’s current sort order

OK, I’m convinced there is a better way to do this, but so far this is the only solution I’ve found…
Any other ideas? Leave em in the comments!

Basically the following post shows one possible way of determining the current sort order of a data grid by grabbing the sortDescending property whenever a user presses on a data grid header.

Full code after the jump.

Continue reading ‘Determining a DataGridColumn object’s current sort order’