Archive for June, 2009

Posted by admin at 2 June 2009

Category: programming

Tags: , , ,

Edit: This project is now on github: git://github.com/danjarvis/DateTimeChooser.git

The Flex UIComponents for Dates, namely DateField and DateChooser let you easily collect date information from the users of your application(s). However, and I’m not exactly sure why, but these components lack an interface for choosing time. The application I’m currently working on deals heavily with Date/Time – thus this was a major issue for me.

A quick search on Google returns a bunch of custom components which solve the issue of choosing Date/Time in Flex. While a few of the components I found would have been fine for my use I decided to roll my own, mainly for educational purposes.

This component can be customized in several different ways. Additionally, all of the children (e.g. NumericSteppers) are exposed so that styles can be applied. Let me know if you have any questions on some of the properties as I am only showing the basics here.



This movie requires Flash Player 9


Source can be downloaded here.

Enjoy!

Posted by admin at 1 June 2009

Category: programming

Tags: , , ,

Most of the Flex Containers have the cornerRadius attribute. This is a lovely attribute which allows you to round the corners of layout objects. Better yet, the Panel and TitleWindow components let you round the just top corners – YAY! So… why the HELL didn’t Adobe implement the rounding of SPECIFIC corners on any component that had a cornerRadius attribute?!

Anyways, I wanted something like this that I could use in applications for aesthetic purposes. I found a few solutions here and there which would have been adequate. However, for educational purposes, I decided to just roll out my own. Now, there are a few quirks here and there, but overall I am satisfied with the outcome. Just be careful if you are placing children inside ( take into account padding if you are giving the box heavily rounded corners ). Additionally, when rounding the corners and using a height / width that scales ( percentage ), it is important to find and use a minHeight and minWidth or else the box WILL become all wacked out when it gets small. It is all relative to the amount of corner radius you specify. Use the style explorer to see what I mean.

Below is a screen shot of what can be created using this component.

A style explorer can be found here ( with a link to source ).

Source can be downloaded here.

Enjoy!