在 CDF Player 输入字段内按 ENTER 键会复制行。如何改变行为?
我创建了一个 CDF,在文本中间有一些输入字段,供读者输入自己的值。
在 CDF 播放器 (8.0.3) 上一切正常,除非用户在更改字段内的值后按 ENTER 键而不是:“Return”或“Tab”或“鼠标选择其他字段”。
如果他按下 ENTER,CDF 播放器会执行与 Mathematica 完全相同的操作:复制行,最终在中间显示一些内部单元结构。
所有 Mathematica 用户都可以轻松避免按 ENTER 键,但 CDF Player 用户很可能没有意识到这种 ENTER/RETURN 双重性。
我已经尝试了我能记得的所有笔记本选项:部署、可编辑等,但没有成功,
我记得的另一件事是使用 NotebookEventAction 删除 ENTER 操作,但找不到如何执行此操作:{“KeyDown” ,“输入”}->空??? ;尝试了Enter、EnterKey、[EnterKey]等,但没有成功。
有人可以帮助我从 CDF 付款人中删除此 Enter 副作用吗?
I have created a CDF that has some InputFields in the middle of the text, for the reader to enter his own values.
Everything works fine on the CDF Player (8.0.3) except when the user, after changing a value inside a field, presses ENTER instead of: "Return" or "Tab" or "mouse selecting other field".
If he presses ENTER, the CDF player does exactly the same thing that Mathematica does: a line duplication, with eventually some internal cell structure showing in the middle.
All Mathematica users can easily avoid pressing ENTER, but the CDF Player users are most likely not aware of this ENTER/RETURN duality.
I've tried all the notebook options I could remember: deployed, editable, etc., with no success,
Another thing I remembered was to remove the ENTER action with the NotebookEventAction, but could not find how to do it: {"KeyDown", "Enter"}->Null ??? ; tried Enter, EnterKey, [EnterKey], etc, with no success.
Can someone help me to remove this Enter side effect from the CDF Payer?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这对于数字非常有效:
对于其他输入类型,shift-Enter 会创建换行符。
This works well for numbers:
For other input types shift-Enter creates a line-break.