如何删除 Flex 4 TextArea 组件的边框(spark 主题光环)
使用 Flex 3 SDK,您只需将 borderThickness 样式设置为 0,或将 borderStyle 设置为 none。 对于 Flex 4 SDK 和 Spark 主题,这没有效果。
With the Flex 3 SDK you simply needed to set the borderThickness style to 0, or set borderStyle to none. With the Flex 4 SDK ad the Spark theme, this has no effect.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
尝试类似的方法:
Try something like:
如果您想从 spark TextArea 中删除边框,可以使用以下几种方法:
要使所有 Spark TextAreas 没有边框,您可以这样做:
您还可以制作一个简单的样式,然后仅将它们应用到特定的 Spark TextAreas,如下所示:
您可以通过创建完成将其关闭,如下所示:
最后,您可以制作皮肤,根据 DrMaxmAd 的建议,如下所示:
If you want to remove the border from spark TextArea's here are some ways to do so:
To make all spark TextAreas have no border you can do this:
You can also make a simple style and only apply them to specific spark TextAreas like so:
You can turn it off via creation complete like so:
Finally, you can make a skin, per DrMaxmAd's suggestion, like so:
我还没有涉足 Flash Builder 4,但我知道在 Flex 3 中您可以修改如下内容(当其他方式不可能时):
可能想尝试一下,您通常只需要找到正确的子元素。
编辑:这是您的答案
I haven't dabbled in Flash Builder 4 yet, but I know in Flex 3 you can modify things like this (when its not possible another way):
Might want to give this a try, you just need to find the correct child element usually.
EDIT: Here's your answer
您必须将 borderSkin 设置为 null
You have to set the borderSkin to null
Jeol,您的答案适用于 MX 组件,对于 Flex 4 Spark textarea 组件,您设置 borderVisible="false" 并在代码 lblMessage.setStyle("contentBackgroundAlpha", 0); 中设置
另外,如果你这样做,你可能希望黑客让该死的东西自动调整其内容...设置 heightInLines="{NaN}"
...感谢 RobotLegs,它太棒了!
Jeol your answer works for MX components, for the flex 4 spark textarea component you set borderVisible="false" and in code lblMessage.setStyle("contentBackgroundAlpha", 0);
Also, if your doing this, you probably want the hack to make the damn thing autosize to it's content... set heightInLines="{NaN}"
...and Thanks for RobotLegs, it's freaking awesome!
好吧,我已经尝试了上面的代码,但它对我的 Flex Hero SDK 4.5 不起作用,所以我选择了 textArea 并创建了一个新的自定义皮肤并将边框 alpha 更改为 0。
简单而甜蜜
well i have tried the above code but it does not work for me Flex Hero SDK 4.5, so what i did i selected the textArea and created a new custom skin and change the border alpha to 0.
simple and sweet
在 Flex 3 中: TextArea 组件的边框可以通过使用以下两个属性/属性进行控制:
Focus alpha 确保即使 TextArea 处于打开状态也不会显示边框已选择。
In Flex 3: The border for TextArea component can be controlled by using these two attributes/properties:
Focus alpha ensures that you don't get the border showing up even when the TextArea is selected.