Archive for June, 2009

Panel with no title

A recent change that people may have missed is that Spark Panel no longer requires the title bar as a skin part. If you want a Spark Panel without a title bar you can modify the skin to remove what is currently listed as layer 4 (the Rect used for the title bar highlight) and layer 5 (the SimpleText component used to display the title).


Just a quick heads up to anyone who notices issues with custom skins on Spark components. A number of skin parts have been renamed and therefore will need to be updated in any custom skins you may be using. A quick way to fix your Skins is to grab the latest build from the open source site and take a look at the new skin where you’ll notice the name changes. Update the id tag in your custom skin and you should be back up and running.

Formatting the NumericStepper display value

The Spark NumericStepper component has two built in properties that allow a developer to format the NumericStepper value in any way that they choose. For example, if you want to add a “$” to the front of your value, you can do so using these properties. The properties are valueFormatFunction and its companion function, the valueParseFunction. Each of these properties works the same way: you specify the name of a function that you write to perform the desired action. One common mistake is to only use the valueFormatFunction, and then wonder why the NumericStepper no longer works as expected. The reason is that if you convert the value to a string in order to append something to it, you then have to make use of an valueParseFunction to extract the value from the string in order for the NumericStepper to be able to use it again. In most cases these properties should be used together – the valueFormatFunction to specify a function to format the value and the valueParseFunction to specify the function to extract the value. Examples can be found here: valueFormatFunction; valueParseFunction