OK, this is a pretty neat trick. Flex makes it pretty easy to customize the look and feel of the DataGrid. For example, the following code lets you toggle the data grid’s horizontalGridLines and verticalGridLines styles on or off, change the alternating row background colors so each row is a plain white, and sets the horizontalGridLineColor and verticalGridLineColor styles to red.
Full code after the jump.
Continue reading ‘Toggling a DataGrid control’s horizontal grid lines and vertical grid lines’
Ever wonder how to control the amount of time that a tool tip stays visible before disappearing? Well, wonder no more! You can control the length of time that a tool tip remains visible from the default 10 seconds to whatever you want by setting the ToolTipManager.hideDelay property. Simply set the value to however many milliseconds you want the tool tip to be visible for before disappearing and you’re set.
Full code after the jump.
Continue reading ‘Setting the amount of time that a tool tip is visible using the ToolTipManager class’
One of my favorite Flex components is the the trusty DataGrid. It seems whenever I build some sort of application or sample, I need a DataGrid to show all sorts of debug data or what have you. Here is a simple little example of a DataGrid with multi-line content and a variable row height.
Full code after the jump.
Continue reading ‘Creating multi-line data grid rows with variable row heights’
Some imaginary blog reader asks, “How do i change a Slider’s dataTip based on which Slider thumb is being dragged?”
I crafted up this sneaky code to listen for the thumbPress and thumbRelease events to log which slider is being… slid?
Full code after the jump.
Continue reading ‘Formatting multiple data tips in a Slider’
I was experimenting with the VideoDisplay control the other day and built this simple little example to help me understand the order of events when loading a Flash Video (FLV).
Continue reading ‘Getting started with the VideoDisplay control’
The other day I was playing with the VideoDisplay control in Flex and was curious why my simple test cases were not working. Well, as it turns out, my remote server wasn’t available so the Flash Video (FLV) couldn’t be loaded. So I quickly typed up the following code to listen for the stateChange event to see if my VideoDisplay control was getting into the dreaded connectionError state (represented by the VideoDisplay.CONNECTION_ERROR constant).
Full code after the jump.
Continue reading ‘Detecting a connection error when loading an FLV with the VideoDisplay control’
Here’s a simple example that listens for the cuePoint event on a VideoDisplay control and updates a DataGrid control whenever the cue point is encountered.
Full code after the jump.
Continue reading ‘Listening for a Flash Video’s cue points using the VideoDisplay control’