Skip to main content



      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 12:53 Go to next message
Eclipse UserFriend
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 10:42 Go to previous messageGo to next message
Eclipse UserFriend
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 13:37 Go to previous message
Eclipse UserFriend
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: Mon Jul 14 03:43:05 EDT 2025

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

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

Back to the top