Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Background application is getting activated.
Background application is getting activated. [message #482862] Fri, 28 August 2009 10:58 Go to next message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 87
Registered: July 2009
Member
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 14:48 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
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 #483007 is a reply to message #482926] Sat, 29 August 2009 07:26 Go to previous messageGo to next message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 87
Registered: July 2009
Member
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
Re: Background application is getting activated. [message #483195 is a reply to message #483007] Mon, 31 August 2009 14:20 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
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
>
>
Previous Topic:Resize a composite dynamically
Next Topic:Table selection via checkboxes
Goto Forum:
  


Current Time: Fri Mar 29 13:05:58 GMT 2024

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

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

Back to the top