Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to hide/disable refresh from Browser's context menu
How to hide/disable refresh from Browser's context menu [message #940457] Thu, 11 October 2012 16:53 Go to next message
Page Wang is currently offline Page Wang
Messages: 16
Registered: July 2009
Junior Member
Hi,

I am using the Browser widget to display some HTML. There are a few menu items on the Browser's context menu not applicable, is there a way to disable or hide them? The ones I like to hide are "Encoding" and "Refresh".

Thanks for the help!
Page
Re: How to hide/disable refresh from Browser's context menu [message #945698 is a reply to message #940457] Mon, 15 October 2012 14:42 Go to previous messageGo to next message
Grant Gayed is currently offline Grant Gayed
Messages: 2151
Registered: July 2009
Senior Member
Hi,

Any context menu that you get for free is coming from the native
control, not from swt, so there is no way to add/remove/modify the
menu's items.

The one thing you can consider doing is to replace this menu with your
own (Control.setMenu()). This of course would require you to
re-implement functionality for all menu items that you want to offer.
Some of these would be easy to do via Browser API (eg.- Back, Forward),
some would be doable via Browser.execute() (eg.- Print), and some would
likely not be doable at all (eg.- Print Preview).

HTH,
Grant


On 10/11/2012 12:53 PM, Page Wang wrote:
> Hi,
>
> I am using the Browser widget to display some HTML. There are a few menu
> items on the Browser's context menu not applicable, is there a way to
> disable or hide them? The ones I like to hide are "Encoding" and "Refresh".
>
> Thanks for the help!
> Page
Re: How to hide/disable refresh from Browser's context menu [message #948032 is a reply to message #945698] Wed, 17 October 2012 17:37 Go to previous message
Page Wang is currently offline Page Wang
Messages: 16
Registered: July 2009
Junior Member
Thanks for the reply. That was what I implemented by creating my own menu, but wanted to check if there is any other easier ways.
Previous Topic:Show values into TableEditor
Next Topic:Text setSelection Issue
Goto Forum:
  


Current Time: Thu Oct 23 22:10:31 GMT 2014

Powered by FUDForum. Page generated in 0.02039 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software