Flex - 使用复选框禁用软键盘
我有一个文本区域和一个复选框。我想在选中该复选框时禁用软键盘,以便可以滚动 TextArea 而不会弹出它。单击复选框时,我可以禁用键盘,但一旦单击文本区域滚动,它就会弹出。如何使用复选框启用/禁用键盘?下面是我的代码:
protected function toggle_keyboard_clickHandler(event:MouseEvent):void
{
checkboxStatus = event.target.selected;
if(checkboxStatus == true){
SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE;
}else{}
}
I have a TextArea and a Checkbox. I want to disable the SoftKeyboard when the checkbox is checcked, so the TextArea can be scrolled without it popping up. I can get the keyboard to disable when the Checkbox is clicked, but as soon as I click on the TextArea to scroll it pops back up. How do I enable/disable the keyboard with a checkbox? Below is my code:
protected function toggle_keyboard_clickHandler(event:MouseEvent):void
{
checkboxStatus = event.target.selected;
if(checkboxStatus == true){
SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE;
}else{}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当在设备或操作系统上激活或停用软件驱动的键盘时,将调度 SoftKeyboardEvent 对象。 SoftKeyboardEvent 对象由需求SoftKeyboard 属性设置为 true 的 TextField 或 InteractiveObject 调度。
A SoftKeyboardEvent object is dispatched when a software-driven keyboard is activated or de-activated on a device or operating system. A SoftKeyboardEvent object is dispatched by a TextField or InteractiveObject that has the needsSoftKeyboardproperty set to true.