Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex 更改柔性标签的圆角半径和组合框的箭头_Apache Flex - Fatal编程技术网

Apache flex 更改柔性标签的圆角半径和组合框的箭头

Apache flex 更改柔性标签的圆角半径和组合框的箭头,apache-flex,Apache Flex,我有两个问题 如何在Flex中更改标签组件的角半径。尝试应用样式名和setStyle('cornerRadius',9)方法,但不起作用 如何将组合框控件中的箭头图像更改为其他图像 请给出您的建议。好的,我已经编辑了我的答案。 看起来唯一的方法就是把标签像HBox一样包装在一个容器里 <mx:HBox width="100%" horizontalAlign="right" id="hbox1" cornerRadius="16" borderStyle="solid"> <

我有两个问题

  • 如何在Flex中更改标签组件的角半径。尝试应用样式名和setStyle('cornerRadius',9)方法,但不起作用
  • 如何将组合框控件中的箭头图像更改为其他图像

  • 请给出您的建议。

    好的,我已经编辑了我的答案。 看起来唯一的方法就是把标签像HBox一样包装在一个容器里

    <mx:HBox width="100%" horizontalAlign="right" id="hbox1" cornerRadius="16" borderStyle="solid">
      <mx:Label label="{stuff}" id="opLabel" />
    </mx:HBox>
    

    要更改组合框箭头,您需要更改以下外观:

    • 上皮
    • 外皮
    • 紧身衣
    • 残废皮肤
    对于可编辑的组合框,您需要更改以下外观:

    • 可编辑upskin
    • 可编辑外皮
    • 可编辑羽绒服
    • 可编辑皮肤

    如果您使用actionScript编码,请尝试使用此脚本,首先必须在css文件属性中创建,例如:

    CSS-File
    .lineCorner{  corner-radius: 20; }
    
    在主mxml应用程序中,您必须将
    styleName
    设置为标签,如下示例:

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

    使用Spark组件可使用BorderContainer控件

    <s:BorderContainer id="brdr"
                       cornerRadius="6"
                       width="80" height="30"
                       horizontalCenter="0" verticalCenter="0">
                       <s:Label id="lblFoo" 
                                text="Bar"
                                width="100%" height="15"
                                horizontalCenter="0" verticalCenter="0"/>
    </s:BorderContainer>
    

    尝试过……我发现错误“无法解析组件类型mx.controls.Label的属性‘cornerRadius’。”