Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » SWT GUI designer issues
SWT GUI designer issues [message #788970] Thu, 02 February 2012 12:55 Go to next message
Kelly Wiles is currently offline Kelly WilesFriend
Messages: 4
Registered: August 2011
Junior Member
Been having these types of issues for a while now, years really.

Kind a hard to explain but will try.

In the designer after placing several widgets I get to a point were some or all of the widgets can no longer be re-sized or moved. When re-sizing a widget I grab a side and drag the edge and release mouse button, it jumps back to original size or sometimes the whole widget moves to a different spot.

Sometimes when I grab an edge to increase widget size to the right, it appears to work but when I release mouse button the whole widget moves to the right. I then drag the left edge, it appears to be working but when I release mouse the whole widget moves to the left. After about the 3rd or 4th time of doing this the widget expands correctly.

Sometimes I can not get the designer to attach a widget to another or to an edge of the shell widget. I normally have to try and adjust the Layout settings of the widget using the designer.

I have attached some code. This code shows that I can not get the text widgets to grow and shrink as I increase or decrease the shell widget in the Quick test/preview mode.

Also why did the designer place the generated code in the TstSwt method and not the createContents method?

Sorry if this makes no sense, a movie would help a lot here I think but not sure how to create one, any ideas on this I can try it.

Thanks
  • Attachment: TstSwt.java
    (Size: 3.22KB, Downloaded 233 times)
Re: SWT GUI designer issues [message #789001 is a reply to message #788970] Thu, 02 February 2012 13:43 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
What is your SWT > Layouts > FormLayout > FormLayout editing mode pref set to? I would recommend Classic mode for most poiwer users as it gives you much more placement control than Automatic Placement mode.

What is your SWT > Code Generation > Method name for new statements pref set to? That should control where new code is generated. If you move the widget definitions to that method, does it then add new ones there as well?
Re: SWT GUI designer issues [message #789030 is a reply to message #789001] Thu, 02 February 2012 14:17 Go to previous messageGo to next message
Kelly Wiles is currently offline Kelly WilesFriend
Messages: 4
Registered: August 2011
Junior Member
Changed it to classic and it works a lot better now.
Seems it should default to classic if others are having the same issues.

The code generation was not set to anything, I changed it to createContents.
The new widgets added will go to the createContenets method but the existing code I had to move myself to the createContents method.

Thanks for the help.

Re: SWT GUI designer issues [message #789044 is a reply to message #789030] Thu, 02 February 2012 14:36 Go to previous message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
We haven't had any reports of issues with FormLayout for quite some time. There is a trade off since Classic mode is more complex and Automatic mode is much simpler for new users. We actually recommend that most people use GridLayout as that is almost always a much better choice than FormLayout for most wizards, dialogs or other forms. GridLayout is used virtually everywhere in Eclipse itself while FormLayout is almost never used.

Changing the code generation setting would not have any effect on existing code (since it is already generated), so you would definitely need to move the existing widget definitions there.
Previous Topic:Resize Tool not Working
Next Topic:Error: Could not find or load main class
Goto Forum:
  


Current Time: Fri Apr 19 09:09:23 GMT 2024

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

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

Back to the top