如何在 Berkelium 中启用拖动选择?

发布于 2024-10-26 19:54:28 字数 300 浏览 2 评论 0原文

我有一个使用 Berkelium 作为嵌入式 Web 浏览器的应用程序,但我无法让拖动选择正常工作。我见过其他基于 WebKit 的应用程序的示例,它们的工作方式就像普通浏览器一样(Steam、Awesomium 演示),所以我觉得工作起来应该不那么困难,但我不知道会发生什么错了。

我将所有鼠标按下、鼠标移动和鼠标按下事件传递到 Berkelium 浏览器(窗口上的 mouseButton 和 mouseMoved 函数),我觉得这就是我需要做的全部事情?我无法在网上找到任何有关此问题的帮助,因此希望这里的人可能知道发生了什么或在哪里查看!

谢谢!

I've got an application that's using Berkelium for an embedded web browser, and I'm having trouble getting the drag-selection to work. I've seen examples of other WebKit-based applications that have it working just like a normal browser (Steam, Awesomium demo), so I feel like it shouldn't be that difficult to get working, but I don't know what may be wrong.

I'm passing in all of the mouse down, mouse move, and mouse up events to the Berkelium browser (mouseButton and mouseMoved functions on the Window) and I feel like that's all I should need to do? I wasn't able to find any help online about this, so hopefully someone here might know what's going on or where to look!

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

暖阳 2024-11-02 19:54:28

我在我的应用程序中尝试了 Berkelium 中的拖动选择。它适用于字段,但似乎不适用于页面文本。

I tried drag selection in Berkelium in my app. It works in fields, it doesn't seem to work for page text.

决绝 2024-11-02 19:54:28

看起来此页面上的第二条评论可能适合您:

http://code.google.com/p/berkelium-sharp/issues/detail?id=1#c2

Shift 单击显然可以很好地突出显示文本,因此如果您向下发送按下按钮,按下按钮并按下 Shift,当用户拖动时,它将选择文本。

我不确定这是否会对在列表中选择多个选项之类的事情产生不利影响,但如果您要支持的网站中没有此类事情,那就没关系。我现在想不出任何其他不利影响,但我确信可能存在一些。

这位用户说这对他有用,所以值得一试。

It looks like the second comment on this page could be a fix for you:

http://code.google.com/p/berkelium-sharp/issues/detail?id=1#c2

The shift clicking apparently works fine to highlight text, so if you send a shift down along with button down, and a shift with button up, it will select the text along with it when the user drags.

I'm not sure if this will have an adverse affect on things like selecting multiple options on a list, but if you don't have that type of thing in the site you're trying to support, it wouldn't matter. I can't think of any other adverse effects right now, but I'm sure some probably exist.

This user says it worked for him, so it's worth a shot.

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