actionscript-3 - 通过 AS3 设置组合框文本格式

标签 actionscript-3 flash air combobox

我正在开发一个 AIR 应用程序,我需要更改下拉列表中显示的文本以及组合框上的主要文本的字体大小。我的 ComboBox 很大,但里面显示的文字很小。我尝试通过将 TextFormat 传递给 setStyle 方法,例如:

cmbEmployee.setStyle("textFormat", txtform);

但它没有用。尽管相同的方法适用于 TextField。

有人可以帮忙吗?

最佳答案

ComboBox 是一个包含 textField 的容器和一个 dropdown 成分。您需要将“样式”应用于 ComboBox 内的特定组件:

// Text Formats that needs to be applied on your comboBox
var txtformat:TextFormat = new TextFormat(); 
    txtformat.size = 30;   // Lets just increase the size of fonts   

// Increase the main TextField's font size of your ComboBox
yourComboBox.textField.setStyle("textFormat", txtformat);

// Increase the font size to the dropdown component
yourComboBox.dropdown.setRendererStyle("textFormat", txtformat);

关于actionscript-3 - 通过 AS3 设置组合框文本格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16311141/

相关文章:

android - Adobe AIR CameraUI 叠加图像

actionscript-3 - 1119 : Access of possibly undefined property alpha through a reference with static type flash. 实用程序 :Timer.

actionscript-3 - As3 swf 字节码注入(inject)

flash - 使用 URLLoader AS3 上传图像进度

air - 安装 Adob​​e Air 文件失败并显示 "file damaged"

ios - Away3d 4 + IOS StageWebView + 视频全屏 = View3D 空

actionscript-3 - 在循环中创建具有不同参数的匿名函数

actionscript-3 - as3 像普通影片剪辑一样访问子级(gotoAndPlay 等)

flash - 使用 Adob​​e Air App 捆绑并执行 .app/.exe 文件

java - CRUD 应用程序的富客户端平台推荐