[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Control.setParent() under Windows

If you don't get an answer here I can point you to the albeiro-newsgroup which deals with Swing/AWT-SWT integration problems and people might know more about the issues you can run into.

I would also suggest that your message title could have been better by integrating Swing so people from this project skimming the newsgroups take a look at your question.

I copied your request to this newsgroup.

See http://www.eclipse.org/albireo/

Tom

Magnus Konze schrieb:
Sorry for pushing this topic. Perhaps my question was to detailed.
Basically i'm interested with experiences with setParent() under Windows. So in short:
Do i have to expect problems with setParent()? My application will only run under Windows systems.
Regards Magnus



Magnus Konze schrieb:
Hi!
I'm using the SWT_AWT bridge to add SWT-Controls to Swing.
When using the bridge in this direction the Swing Window has to be visible, when adding SWT-Controls, otherwise you get a 'peer not created'-Exception.
So i have to call setVisible(), although i don't know the size of the SWT-Controls.
Here is my idea:
- create a new Shell with the Controls i want to add to the Swing Window
- compute the Shells size
- setSize() on the Swing Window
- setVisible() on the Swing Window
- create a new Shell on the Swing Window (SWT_AWT.new_Shell())
- set this Shell as the parent of my SWT Controls
- dispose first Shell


The first Shell is never opened!

I'm using Windows XP and it works fine. So my question is:
Do i have to expect problems on other systems (especially other Windows systems)? Are there other problems aside from that it's not possible to change the parent on all systems?


Regards Magnus


--
B e s t S o l u t i o n . at
--------------------------------------------------------------------
Tom Schindl                                          JFace-Committer
--------------------------------------------------------------------