Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Always on top
Always on top [message #436567] Wed, 19 May 2004 15:21 Go to next message
Mark Victory is currently offline Mark VictoryFriend
Messages: 133
Registered: July 2009
Senior Member
I am writing a Rich Client Platform application.
Is there any way to make set the application to be "always on top"?

Thanks,
Mark
Re: Always on top [message #436569 is a reply to message #436567] Wed, 19 May 2004 15:24 Go to previous messageGo to next message
Heitzso is currently offline HeitzsoFriend
Messages: 20
Registered: July 2009
Junior Member
This is a variation of my question, which was how do you
force display order (the display stack) within the app.
If you find out an answer outside of the newsgroup
please post it back into the news group so I can pick
it up. Thanks

> I am writing a Rich Client Platform application.
> Is there any way to make set the application to be "always on top"?

> Thanks,
> Mark
Re: Always on top [message #436634 is a reply to message #436569] Thu, 20 May 2004 21:08 Go to previous messageGo to next message
David Thomson is currently offline David ThomsonFriend
Messages: 65
Registered: July 2009
Member
Heitzso wrote:

> This is a variation of my question, which was how do you
> force display order (the display stack) within the app.
> If you find out an answer outside of the newsgroup
> please post it back into the news group so I can pick
> it up. Thanks
>
>> I am writing a Rich Client Platform application.
>> Is there any way to make set the application to be "always on top"?
>
>> Thanks,
>> Mark

Shell shell = new Shell(display,SWT.ON_TOP);
Re: Always on top [message #436779 is a reply to message #436634] Sun, 23 May 2004 11:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sun69.163.net

thanks
"David Thomson" <david@suprasphere.com> ??????:c8j5el$7it$1@eclipse.org...
> Heitzso wrote:
>
> > This is a variation of my question, which was how do you
> > force display order (the display stack) within the app.
> > If you find out an answer outside of the newsgroup
> > please post it back into the news group so I can pick
> > it up. Thanks
> >
> >> I am writing a Rich Client Platform application.
> >> Is there any way to make set the application to be "always on top"?
> >
> >> Thanks,
> >> Mark
>
> Shell shell = new Shell(display,SWT.ON_TOP);
>
Re: Always on top [message #436780 is a reply to message #436634] Mon, 24 May 2004 01:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sun69.163.net

thanks
"David Thomson" <david@suprasphere.com> ??????:c8j5el$7it$1@eclipse.org...
> Heitzso wrote:
>
> > This is a variation of my question, which was how do you
> > force display order (the display stack) within the app.
> > If you find out an answer outside of the newsgroup
> > please post it back into the news group so I can pick
> > it up. Thanks
> >
> >> I am writing a Rich Client Platform application.
> >> Is there any way to make set the application to be "always on top"?
> >
> >> Thanks,
> >> Mark
>
> Shell shell = new Shell(display,SWT.ON_TOP);
>
Re: Always on top [message #436793 is a reply to message #436634] Mon, 24 May 2004 14:46 Go to previous messageGo to next message
Mark Victory is currently offline Mark VictoryFriend
Messages: 133
Registered: July 2009
Senior Member
Thanks David,

Do you know if there is a way other than via the constructor to set the
shell to be always on top.
I need to be able to transition my application into and out of the always on
top state based on user actions.

Thanks again,
Mark

"David Thomson" <david@suprasphere.com> wrote in message
news:c8j5el$7it$1@eclipse.org...
> Heitzso wrote:
>
> > This is a variation of my question, which was how do you
> > force display order (the display stack) within the app.
> > If you find out an answer outside of the newsgroup
> > please post it back into the news group so I can pick
> > it up. Thanks
> >
> >> I am writing a Rich Client Platform application.
> >> Is there any way to make set the application to be "always on top"?
> >
> >> Thanks,
> >> Mark
>
> Shell shell = new Shell(display,SWT.ON_TOP);
>
Re: Always on top [message #436794 is a reply to message #436634] Mon, 24 May 2004 14:47 Go to previous messageGo to next message
Mark Victory is currently offline Mark VictoryFriend
Messages: 133
Registered: July 2009
Senior Member
Thanks David,

Do you know if there is a way other than via the constructor to set the
shell to be always on top.
I need to be able to transition my application into and out of the always on
top state based on user actions.

Thanks again,
Mark

"David Thomson" <david@suprasphere.com> wrote in message
news:c8j5el$7it$1@eclipse.org...
> Heitzso wrote:
>
> > This is a variation of my question, which was how do you
> > force display order (the display stack) within the app.
> > If you find out an answer outside of the newsgroup
> > please post it back into the news group so I can pick
> > it up. Thanks
> >
> >> I am writing a Rich Client Platform application.
> >> Is there any way to make set the application to be "always on top"?
> >
> >> Thanks,
> >> Mark
>
> Shell shell = new Shell(display,SWT.ON_TOP);
>
Re: Always on top [message #436803 is a reply to message #436793] Mon, 24 May 2004 16:35 Go to previous messageGo to next message
David Thomson is currently offline David ThomsonFriend
Messages: 65
Registered: July 2009
Member
Mark Victory wrote:

> Thanks David,
>
> Do you know if there is a way other than via the constructor to set the
> shell to be always on top.
> I need to be able to transition my application into and out of the always on
> top state based on user actions.
>
> Thanks again,
> Mark
>
You can try shell.setActive()/shell.forceActive();

If you want to set it's state to be permanently ontop after it has been
constructed otherwise, you can do some native stuff to do it, but it
will only work on Windows. There might be another way, but I don't know
of it. Let me know if you have any more questions about this as I've
experimented with it a lot.


int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
OS.SetWindowPos(shell.handle, OS.HWND_TOPMOST, 0, 0, 0, 0,flags);


David
Re: Always on top [message #444960 is a reply to message #436780] Fri, 22 October 2004 10:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andre.harry.motoring4.co.uk

When i tried to use SWT.ON_TOP

Somehow all the window decorations (border, title, etc) are gone
Then i tried to add them by using SWT.SHELL_TRIM somehow it only dislay
the border, title, and close button. I cant seem to get the
MINIMIZE/MAXIMIZE buttons to be there

Anyone can help?

Thanks,
Andre

sundragon wrote:
> thanks
> "David Thomson" <david@suprasphere.com> ??????:c8j5el$7it$1@eclipse.org...
>
>>Heitzso wrote:
>>
>>
>>>This is a variation of my question, which was how do you
>>>force display order (the display stack) within the app.
>>>If you find out an answer outside of the newsgroup
>>>please post it back into the news group so I can pick
>>>it up. Thanks
>>>
>>>
>>>>I am writing a Rich Client Platform application.
>>>>Is there any way to make set the application to be "always on top"?
>>>
>>>>Thanks,
>>>>Mark
>>
>>Shell shell = new Shell(display,SWT.ON_TOP);
>>
>
>
>
>
>
>
Re: Always on top [message #446393 is a reply to message #444960] Wed, 24 November 2004 12:55 Go to previous message
No real name is currently offline No real nameFriend
Messages: 12
Registered: July 2009
Junior Member
You have to bitwise OR the styles you want together:

Shell shell = new Shell(display,SWT.ON_TOP | SWT.MAX | SWT.MIN | SWT.CLOSE);

look at the Styles list in:
" http://download.eclipse.org/downloads/documentation/2.0/html /plugins/org.ec
lipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets /Shell.html "

Jayshan.

"Andre Harry" <andre.harry@motoring4.co.uk> wrote in message
news:clam88$j0h$1@eclipse.org...
> When i tried to use SWT.ON_TOP
>
> Somehow all the window decorations (border, title, etc) are gone
> Then i tried to add them by using SWT.SHELL_TRIM somehow it only dislay
> the border, title, and close button. I cant seem to get the
> MINIMIZE/MAXIMIZE buttons to be there
>
> Anyone can help?
>
> Thanks,
> Andre
>
> sundragon wrote:
> > thanks
> > "David Thomson" <david@suprasphere.com>
??????:c8j5el$7it$1@eclipse.org...
> >
> >>Heitzso wrote:
> >>
> >>
> >>>This is a variation of my question, which was how do you
> >>>force display order (the display stack) within the app.
> >>>If you find out an answer outside of the newsgroup
> >>>please post it back into the news group so I can pick
> >>>it up. Thanks
> >>>
> >>>
> >>>>I am writing a Rich Client Platform application.
> >>>>Is there any way to make set the application to be "always on top"?
> >>>
> >>>>Thanks,
> >>>>Mark
> >>
> >>Shell shell = new Shell(display,SWT.ON_TOP);
> >>
> >
> >
> >
> >
> >
> >
>
Previous Topic:How to avoid Paste to Text widget ?
Next Topic:Text wrap in Tooltip for multiple line text
Goto Forum:
  


Current Time: Sun Oct 25 09:04:35 GMT 2020

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

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

Back to the top