• warning: Parameter 1 to tac_lite_node_grants() expected to be a reference, value given in /home/rbezemer/softwarebyrichard.com/includes/module.inc on line 483.
  • warning: Parameter 2 to gmap_gmap() expected to be a reference, value given in /home/rbezemer/softwarebyrichard.com/includes/module.inc on line 483.
  • warning: Parameter 1 to tac_lite_node_grants() expected to be a reference, value given in /home/rbezemer/softwarebyrichard.com/includes/module.inc on line 483.
  • warning: Parameter 1 to tac_lite_node_grants() expected to be a reference, value given in /home/rbezemer/softwarebyrichard.com/includes/module.inc on line 483.
  • warning: Parameter 1 to tac_lite_node_grants() expected to be a reference, value given in /home/rbezemer/softwarebyrichard.com/includes/module.inc on line 483.
  • warning: Parameter 1 to tac_lite_node_grants() expected to be a reference, value given in /home/rbezemer/softwarebyrichard.com/includes/module.inc on line 483.
  • warning: Parameter 1 to tac_lite_node_grants() expected to be a reference, value given in /home/rbezemer/softwarebyrichard.com/includes/module.inc on line 483.

Flex - Adding icons to a ToggleButtonBar

This was one annoying problem, I wanted a single icon on each button on my toggle button bar but for the life of me I couldn't figure out what was going on. I had set the icon property in my buttonStyle in my applications stylesheet, but my icon was nowhere to be found.

Finally after pullling my hair out for a while, a trip to flexexample found me what I was looking for. The ToggleButtonBar (and any navigation component) uses the data provider supplied to it to pull out the icon resources for each button, so the dataprovider was overriding my stylesheet with null.

So easy fix was to just set a icon property on each item in the data provider with the image you are wanting to use.

here is the link to the example on flex examples: Flex Examples
Your rating: None Average: 2.8 (9 votes)