Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Is there a way to make a no_focused shell not gain focused when the user click on a control on the s
Is there a way to make a no_focused shell not gain focused when the user click on a control on the s [message #1706458] Thu, 27 August 2015 05:05 Go to next message
Eclipse UserFriend
Is there a way to make a no_focused shell not gain focused when the user
click on a control on the shell?
I use a shell and some composite to simulate a popup menu,
I have set no_focus style to the shell,
but it will still gain focused when user click on the control on shell.

Is there a way to make a no_focused shell never gain focused?

Frank
Re: Is there a way to make a no_focused shell not gain focused when the user click on a control on t [message #1706560 is a reply to message #1706458] Thu, 27 August 2015 16:58 Go to previous messageGo to next message
Eclipse UserFriend
I think you can use Shell#setEnabled(false) to disable the shell and its child controls, but it may be rendered slightly differently.
ShellEvent supports a 'doit' flag, so it's possible you can listen for SWT.Activate events and set doit = false. I haven't tested this.
Re: Is there a way to make a no_focused shell not gain focused when the user click on a control on t [message #1706595 is a reply to message #1706560] Fri, 28 August 2015 02:16 Go to previous message
Eclipse UserFriend
Disabled shell will not accept any mouse message (even use Display.Filter
instead, get nothing), then I cannot use it to simulate popup menu.

And set doit of SWT.Activate event to false does not work either.

"Brian de Alwis" <forums-noreply@xxxxxxxx> 写入消息
news:mrnfk9$gs2$1@xxxxxxxxe.org...
> I think you can use Shell#setEnabled(false) to disable the shell and its
> child controls, but it may be rendered slightly differently.
> ShellEvent supports a 'doit' flag, so it's possible you can listen for
> SWT.Activate events and set doit = false. I haven't tested this.
> --
> Eclipse Platform committer. Ask me about Eclipse support, training, and
> consulting.
Previous Topic:How to get the name of the executable file,
Next Topic:SWT browser on linux
Goto Forum:
  


Current Time: Thu Sep 19 15:52:39 GMT 2024

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

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

Back to the top