如何在Actionscript 3的textarea上添加垂直滚动条? [英] How to add vertical scroll bars on textarea in Actionscript 3?

查看:182
本文介绍了如何在Actionscript 3的textarea上添加垂直滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想添加垂直滚动条在textarea星火组件,即我想显示最多5行textarea如果文本行将超过5,然后垂直滚动条会自动添加,如果我将减少文本行,然后垂直滚动bar会自动消失。

我的textarea代码是:

$ $ p $ << ; s:TextArea id =txtAreawidth ={this.width}height =3borderVisible =falsefocusAlpha =0.01
selectionHighlighting =alwaysstyleName =TextBox
needsSoftKeyboard =truefocusRect =falsedirection ={textBoxDirction}buttonMode =trueuseHandCursor =truemouseChildren =true/>

我也尝试使用 verticalScrollPolicy =on和off / code>,但它也不能正常工作。

所以如果有人有一个想法如何在textarea中添加垂直滚动条,请帮我解决这个问题。

解决方案使用

  heightInLines =5

而不是

  height =3


I wants to add vertical scroll bar in textarea spark component, i.e I want to show maximum 5 lines in textarea if text line will more than 5 then vertical scroll bar will automatically add and if i will reduce the text line then vertical scroll bar will automatically disappear.

My textarea code is :

<s:TextArea id="txtArea" width="{this.width}" height="3" borderVisible="false" focusAlpha="0.01" 
            selectionHighlighting="always" styleName="TextBox"
            needsSoftKeyboard="true" focusRect="false" direction="{textBoxDirction}" buttonMode="true" useHandCursor="true" mouseChildren="true"/>

I also tried to use verticalScrollPolicy = "on" and "off" but it is also not working.

So if anybody have an idea how to add vertical scroll bar in textarea please help me to solve this problem.

解决方案

Use

heightInLines="5"

instead of

height="3"

这篇关于如何在Actionscript 3的textarea上添加垂直滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆