Check out this video series on creating components:
Also read the Adobe Docs on creating custom components on the Flex Component LifeCycle
And this documentation on adding custom styles:
I would suspect that you want to override the setStyle method; then invalidateDisplayList and use the updateDisplayList method to make your changes to the style.
I'm surprised that your 'stylesheet' tag is not throwing compiler errors.
Thanks for the reply. Unfortunately, our firewall prevents the first two links. I had read the third, but didn't see how it applied to this case. The fourth one did seem to apply to modifying (sub-classing) an object, but I'm not sure of the limits of "setStyle" for the things I wanted (labelWidth, indicatorGap and object width in particular). The style things like text alignment made sense to "setStyle".
When I changed it to this:
public class fiRightAlignText extends FormItem
public function fiRightAlignText()
private function setDefaults():void
The object broke the form pushing everything to the left off the form (see attached). Here is the original code:
label="Guardian Last Name:"
As you can see you would have to go into many form items to change the label width in this case. As a sub-class I would only have to change it in one place.
Your firewall blocks the only podcast related to Adobe Flex. As the producer of the podcast, I'm bummed to hear that
That said, you seemed to be lacking knowledge on how to create your own components, so I was pointing you to resources on creating your own components, and creating your own styles in those components.
As far as Flex is concerned, a style is just a name and a value. How you implement the styles inside your component is up to you, what things you expose as propertys and what things you expose as values is also up to you.
From your screenshots, I'm unsure how the form is broken; as nothing looks out of place.