Problem with Shell.setMaximized() [message #466852] |
Wed, 18 January 2006 10:39 |
Thomas Mauch Messages: 8 Registered: July 2009 |
Junior Member |
|
|
I have an application where the shell should always be in maximized
mode, i.e. the user should not be able to move, resize or minimize the
application window.
To achieve this behavior, I use Shell.setMaximized(). However this does
not work as intented.
- When I run the application appended below, the window appears
maximized, but the user is still able to change its size by double
clicking on the title bar. Then the window gets resize to a smaller
size. But then double clicking on the title has no longer any effect,
so the user is unable to make the window maximized again.
- When I run the application appended below, the window appears
maximized, but it covers the task bar as well. This is not common
under Windows and does not happen If I change the creation
of the shell to
Shell shell = new Shell(display)
Any ideas?
Thomas
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class Snippet28 {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display, SWT.CLOSE | SWT.TITLE);
shell.setMaximized(true);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
}
|
|
|
|
|
|
Re: Problem with Shell.setMaximized() [message #466886 is a reply to message #466867] |
Wed, 18 January 2006 22:42 |
Terry Corbet Messages: 14 Registered: July 2009 |
Junior Member |
|
|
Bugs #85892 and #108893 have discussions
about this topic.
The first one was resolved as WON'T FIX, but
after some further work, Steve requested it
be re-submitted, which is the current state
of the second one.
In the meantime, if it would be of any help
to you, I'd be happy to provide the workaround-
fix patch code that I use to solve the
problem of a maximized window over-laying the
task bar. My requirement/problem, however,
had a slightly different aspect than what
seems to be most troubling to you, so I am
not 100% certain that my workaround-fix,
as written, will solve yours. I do belief,
however, that a slight modification in the
same section of the code could solve yours.
|
|
|
Powered by
FUDForum. Page generated in 0.03796 seconds