Background application is getting activated. [message #482862] |
Fri, 28 August 2009 06:58  |
Eclipse User |
|
|
|
Hello All,
I created two views in workbecnappilcation.
Based on selection in first view ,Some UI controls will be created in
other view.
While switching selection between the tree items in first view,some times
Back ground application is getting activated.i.e wat ever i sthere in back
ground window gets activated.
please suggest me to avoid above behaviour.
Advance thanks for you reply.
Thanks,
Raghava
|
|
|
Re: Background application is getting activated. [message #482926 is a reply to message #482862] |
Fri, 28 August 2009 10:48   |
Eclipse User |
|
|
|
Hi Raghava,
That shouldn't happen, I don't know what swt would be doing to cause that.
Does the snippet below show the problem? And if not, can you change it to
make it show the problem? And which platform are you on?
public static void main (String [] args) {
final Display display = new Display ();
final Shell shell = new Shell (display);
shell.setLayout(new GridLayout(2, true));
// left pane
final Tree tree = new Tree(shell, SWT.NONE);
// right pane
final Composite composite = new Composite(shell, SWT.NONE);
composite.setLayout(new StackLayout());
new Label(composite, SWT.BORDER).setText("zero");
new Button(composite, SWT.PUSH).setText("one");
new Text(composite, SWT.SINGLE).setText("two");
new Combo(composite, SWT.NONE).setText("three");
// init tree
for (int i = 0; i < composite.getChildren().length; i++) {
new TreeItem(tree, SWT.NONE).setText("item " + i);
}
tree.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
int index = tree.indexOf(tree.getSelection()[0]);
((StackLayout)composite.getLayout()).topControl =
composite.getChildren()[index];
composite.layout();
}
});
((StackLayout)composite.getLayout()).topControl =
composite.getChildren()[0];
shell.pack();
shell.open();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
Grant
"Raghava Rao" <raghavadasyam@gmail.com> wrote in message
news:2abd4d154ab01e857f8a38df2e4c45fa$1@www.eclipse.org...
> Hello All,
>
> I created two views in workbecnappilcation.
>
> Based on selection in first view ,Some UI controls will be created in
> other view.
>
> While switching selection between the tree items in first view,some times
> Back ground application is getting activated.i.e wat ever i sthere in back
> ground window gets activated.
>
> please suggest me to avoid above behaviour.
>
> Advance thanks for you reply.
>
> Thanks,
> Raghava
>
|
|
|
|
Re: Background application is getting activated. [message #483195 is a reply to message #483007] |
Mon, 31 August 2009 10:20  |
Eclipse User |
|
|
|
I still don't know how this could happen, and without a snippet or plug-in
showing the problem happening I can't offer any suggestions.
Grant
"Raghava Rao" <raghavadasyam@gmail.com> wrote in message
news:d9da88cd5ed341c568f2378eadc417c3$1@www.eclipse.org...
> Hello Grant,
>
> Actually i am creating controls in Tabbed properties view.Tabs will be
> created based on selection and controls in active tab will be created in
> same time.
>
> If Number of tabs have to created more then while changing the selection
> back ground application gets activated.
>
> please suggest some solution?
>
> Thanks,
> Raghava
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03643 seconds