获取 Oracle 表单中文本项中的选定文本

发布于 2024-10-03 20:52:40 字数 249 浏览 0 评论 0原文

有以下场景: 在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

仅冇旳回忆 2024-10-10 20:52:40

Oracle 表单中有 3 个内置函数用于处理此类事情:

COPY_REGION
CUT_REGION
PASTE_REGION

它们都是受限制的内置函数,因此您需要选择调用它们的触发器。请参阅文档,它会告诉您是否受限制的内置函数在该特定触发器中是否允许使用 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:

COPY_REGION
CUT_REGION
PASTE_REGION

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 issue COPY_REGION in (the easy one is KEY-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 the PASTE_REGION built-in.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文