获取 Oracle 表单中文本项中的选定文本
有以下场景: 在 Oracle Forms 10 中,有一个包含文本的 TextItem。用户使用鼠标或键盘选择文本的一部分,然后按下其后面带有触发器的表单按钮。
如何找到用户选择的文本部分?
在 VisualBasic 中,有类似 SelectionStart、SelectionEnd、SelectionText 之类的东西。形式上的等价物是什么?有没有机会用WebUtil来做到这一点?
谢谢
There is following scenario:
In Oracle Forms 10, there is a TextItem with text in it. User selects a part of the text using his mouse or keyboard and presses a forms button with trigger behind it.
How do I find the portion of the text selected by the user?
In VisualBasic, there is something like SelectionStart, SelectionEnd, SelectionText. What is the equivalent in forms? Is there any chance to do it with WebUtil?
Thanx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Oracle 表单中有 3 个内置函数用于处理此类事情:
它们都是受限制的内置函数,因此您需要选择调用它们的触发器。请参阅文档,它会告诉您是否受限制的内置函数在该特定触发器中是否允许使用 ins。
它们不带任何参数,仅对当前选定的项目进行操作(请参阅
:system.cursor_item
)。因此,用户位于“textfield1”中,他们选择了数据的特定部分。您需要决定在哪个触发器中发出COPY_REGION
(最简单的是KEY-NEXT-ITEM
)。对于您的示例,当用户按下按钮进行复制时,您的代码将导航到预期的 TextItem 并发出PASTE_REGION
内置函数。There are 3 built-ins in Oracle form for handling this sort of thing:
They are all restricted built-ins, so you need to be choosy about which trigger you call them in. Refer to the documentation, it will tell you whether restricted built ins are allowed or not in that particular trigger.
They take no parameters, only operating on the currently selected item (see
:system.cursor_item
). So, the user is in "textfield1" and they select a certain portion of the data. You need to decide which trigger to issueCOPY_REGION
in (the easy one isKEY-NEXT-ITEM
). For your example, when the user would then press the button to copy, your code would navigate to the intented TextItem and issue thePASTE_REGION
built-in.