启用"在新标签"在web浏览器的上下文菜单项? [英] Enabling "Open In New Tab" item in WebBrowser's context menu?

查看:159
本文介绍了启用"在新标签"在web浏览器的上下文菜单项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能实现在web浏览器打开在新标签页上下文菜单项?然后,我会弄清楚如何处理它,但首先我需要它至少看起来启用。

Is it possible to enable the "Open In New Tab" context menu item in a WebBrowser? Then I'll figure out how to handle it, but first I need to make it at least look enabled.

推荐答案

的的 web浏览器控件不支持多标签浏览。你必须创建自己的选项卡(例如,使用的的TabControl 控制),其中将包括web浏览器的实例。还有它如何可以实施 <一个伟大的解释href="http://stackoverflow.com/questions/1286746/open-link-in-new-tab-webbrowser-control">here, <一个href="http://stackoverflow.com/questions/4532635/c-open-webrowser-in-many-tab">there.

The WebBrowser control does not support multi-tab navigation. You'll have to create your own tabs (for example, using the TabControl control) which would contain instances of WebBrowser. There are great explanations on how it could be implemented here, there and there.

然后,你需要加入的打开在新标签的行动来定制您的web浏览器的右键菜单。这一行动将引发你自己的实现多标签浏览。要自定义快捷菜单,检查这篇文章:<打击>的如何自定义在C#中的web浏览器上下文菜单 web浏览器定制

Then, you'll need to customize the context menu of your WebBrowser by adding the "Open In New Tab" action. That action will trigger your own implementation of multi-tab navigation. To customize the context menu, check this article: How to customize the WebBrowser context menu in C# WebBrowser Customization.

这篇关于启用&QUOT;在新标签&QUOT;在web浏览器的上下文菜单项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆