tags:

views:

723

answers:

3

Hi,

I have two questions.

  1. How do I change the corner radius of a Label component in Flex. Tried applying style name, and the setStyle('cornerRadius',9) methods, but doesn't work.
  2. How can I change the arrow image in the combo box control to a different image?

Please give your suggestions.

+1  A: 

Ok, I've edited my answer. Looks like the only way to do it is wrap the Label in a container like an HBox

<mx:HBox width="100%" horizontalAlign="right" id="hbox1" cornerRadius="16" borderStyle="solid">
  <mx:Label label="{stuff}" id="opLabel" />
</mx:HBox>
Nick
Tried it...and I get the error 'Cannot resolve attribute 'cornerRadius' for component type mx.controls.Label.'
whoopy_whale
I edited my answer. This should work for you.
Nick
A: 

To change the combobox arrow you need to change the following skins:

  • upSkin
  • overSkin
  • downSkin
  • disabledSkin

For an editable combobox you need to change the following skins:

  • editableUpSkin
  • editableOverSkin
  • editableDownSkin
  • editableDisabledSkin
Osman
A: 

Hi, if you coding on actionScript try this one, at first you have to create in your css file attribute, for example :

CSS-File
.lineCorner{  corner-radius: 20; }

And in your main mxml app you have to set styleName to your "Label" like this examp:

var myLabel:Label = new Label();
myLabel.text = "Bla-Bla-Bla";
myLabel.styleName = "lineCorner";
this.addChild(myLabel);
Vadim Slutsky