Skip to main content


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 Mising name is currently offline Page Mising nameFriend
Messages: 31
Registered: July 2009
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 GayedFriend
Messages: 2150
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 Mising name is currently offline Page Mising nameFriend
Messages: 31
Registered: July 2009
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 Apr 25 19:39:56 GMT 2024

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

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

Back to the top