模拟数据窗口文本字段中的超链接功能
这个想法相当简单。某些数据窗口(不是 Web 数据窗口)varchar 字段包含详细说明。我想知道是否可以向用户提供以下(类似维基百科)功能:在阅读时单击(或双键单击或其他方式)文本的特定单词
的能力(其中不知何故应该被指示为可点击 - 如果它们可以被涂成蓝色那就完美了,但我认为这是不可能的)并打开一个相关的窗口(或响应)。您认为这样的事情可以实施吗?
The idea is rather simple. Some datawindow (not web datawindow) varchar fields contain detailed descriptions. I was wondering if it is possible to provide the following (wikipedia-like) functionality to users: The ability to click (or dbl-click or whatever) on specific words
of the text, while reading (which somehow should be indicated as clickable - it would be perfect if they could be colored blue but I don't think this is possible) and open a relevant window (or response). Do you think something like this could be implemented?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要实现颜色,如果您使用的是 PB 11.5,则可以使用富文本编辑样式。
对于超链接功能,我会尝试利用 Clicked 事件,尝试使用 SelectedStart() 来识别单击了哪个单词,然后确定它是否是超链接。该列需要具有 TabOrder,以便单击会将光标置于文本中。
祝你好运,
特里。
To achieve the colour, you could use a rich text edit style if you're using PB 11.5.
For the hyperlink functionality, I'd try to leverage the Clicked event, trying to identify with SelectedStart() what word has been clicked and then whether or not it is a hyperlink. The column would need to have TabOrder so that a click would place the cursor in the text.
Good luck,
Terry.
如果您使用 RTF 数据窗口,您可以插入超链接(以您想要的任何颜色或样式)
if you use a RTF datawindow you can insert hyperlinks (in whatever colour or style you wish)