Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to show an non-rectangular window in task bar
How to show an non-rectangular window in task bar [message #442656] Thu, 09 September 2004 21:20 Go to next message
Eclipse UserFriend
Originally posted by: lwj.hz.cn

When I tried to create an non-rectangular window with a statement like
"Shell shell = new Shell(display, SWT.NO_TRIM)", although it works but
didn't show in the windows' task bar. How can I make it possible?
Re: How to show an non-rectangular window in task bar [message #442670 is a reply to message #442656] Fri, 10 September 2004 11:58 Go to previous messageGo to next message
Eclipse UserFriend
Did you call shell.open() or shell.setVisible()? Did you call
Shell.setText()? If your the parent of your shell is another shell, it
won't show up.

"lvweijian" <lwj@hz.cn> wrote in message news:chqval$icv$1@eclipse.org...
> When I tried to create an non-rectangular window with a statement like
> "Shell shell = new Shell(display, SWT.NO_TRIM)", although it works but
> didn't show in the windows' task bar. How can I make it possible?
>
>
Re: How to show an non-rectangular window in task bar [message #442700 is a reply to message #442670] Sat, 11 September 2004 23:11 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for your post. Maybe I can describe the problem with the sample
codes listed below.
The only thing I want is that This application should show in the windows
task bar just like other application windows.
Anyone can help me?


////////////////////////////////////////////////////
/*
* Created on 2004-9-10
*
*/
package snippets;

import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.graphics.Region;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

/**
* @author lvweijian
*
*/
public class TestNoneRectangleWindow {

public static void main(String[] args) {
TestNoneRectangleWindow window = new TestNoneRectangleWindow();
window.open();
}

public void open() {
final Display display = new Display();
final Shell shell = new Shell(display, SWT.NO_TRIM);
shell.setText("SWT Application");
Region region = new Region();
region.add(new int[]{100,0,200,150,0,150});
shell.setRegion(region);

shell.setBackground(display.getSystemColor(SWT.COLOR_INFO_BA CKGROUND));

shell.addMouseListener(new MouseAdapter() {

public void mouseDoubleClick(MouseEvent e) {
shell.close();
}
});

shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
}
}


///////////////////////////////////////////////////////

Steve Northover wrote:

> Did you call shell.open() or shell.setVisible()? Did you call
> Shell.setText()? If your the parent of your shell is another shell, it
> won't show up.

> "lvweijian" <lwj@hz.cn> wrote in message news:chqval$icv$1@eclipse.org...
> > When I tried to create an non-rectangular window with a statement like
> > "Shell shell = new Shell(display, SWT.NO_TRIM)", although it works but
> > didn't show in the windows' task bar. How can I make it possible?
> >
> >
Re: How to show an non-rectangular window in task bar [message #442803 is a reply to message #442700] Mon, 13 September 2004 13:05 Go to previous message
Eclipse UserFriend
WORKSFORME.

I see an item in the task bar called 'SWT Application'. Are you running
3.0?

"lwj" <lvweijian@hz.cn> wrote in message news:ci0epn$dei$1@eclipse.org...
> Thanks for your post. Maybe I can describe the problem with the sample
> codes listed below.
> The only thing I want is that This application should show in the windows
> task bar just like other application windows.
> Anyone can help me?
>
>
> ////////////////////////////////////////////////////
> /*
> * Created on 2004-9-10
> *
> */
> package snippets;
>
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.events.MouseAdapter;
> import org.eclipse.swt.events.MouseEvent;
> import org.eclipse.swt.graphics.Region;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.widgets.Shell;
>
> /**
> * @author lvweijian
> *
> */
> public class TestNoneRectangleWindow {
>
> public static void main(String[] args) {
> TestNoneRectangleWindow window = new TestNoneRectangleWindow();
> window.open();
> }
>
> public void open() {
> final Display display = new Display();
> final Shell shell = new Shell(display, SWT.NO_TRIM);
> shell.setText("SWT Application");
> Region region = new Region();
> region.add(new int[]{100,0,200,150,0,150});
> shell.setRegion(region);
>
> shell.setBackground(display.getSystemColor(SWT.COLOR_INFO_BA CKGROUND));
>
> shell.addMouseListener(new MouseAdapter() {
>
> public void mouseDoubleClick(MouseEvent e) {
> shell.close();
> }
> });
>
> shell.open();
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch()) display.sleep();
> }
> }
> }
>
>
> ///////////////////////////////////////////////////////
>
> Steve Northover wrote:
>
> > Did you call shell.open() or shell.setVisible()? Did you call
> > Shell.setText()? If your the parent of your shell is another shell, it
> > won't show up.
>
> > "lvweijian" <lwj@hz.cn> wrote in message
news:chqval$icv$1@eclipse.org...
> > > When I tried to create an non-rectangular window with a statement like
> > > "Shell shell = new Shell(display, SWT.NO_TRIM)", although it works but
> > > didn't show in the windows' task bar. How can I make it possible?
> > >
> > >
>
>
Previous Topic:I want to use Swing on my PocketPC.
Next Topic:Caret at beginning of text selection
Goto Forum:
  


Current Time: Fri Jul 04 02:13:16 EDT 2025

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

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

Back to the top