Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » How to wrap the description on the first page of wizard (Challenged to wrap a long description on the first page of the wizard..)
How to wrap the description on the first page of wizard [message #1128130] Mon, 07 October 2013 11:21 Go to next message
Kapil Gambhir is currently offline Kapil GambhirFriend
Messages: 5
Registered: March 2013
Junior Member
JFace Wizard lays out its size depending on various controls, in my case the description of the first wizard page is a long one causing the horizontal size of the wizard to be unnecessary long.
Is there a way to programmatically make it wrap, basically not have the description size taken into account for the horizontal size of the wizard. I see if i have a message (not description) set on this wizard it wraps well but description doesnt behave the same way.

I want to avoid any hard coding on the size because then it looks ugly on different 'resolution/text size' setting of the system.

Any relevant help will be greatly appreciated.
Re: How to wrap the description on the first page of wizard [message #1128165 is a reply to message #1128130] Mon, 07 October 2013 12:08 Go to previous message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 312
Registered: February 2012
Location: Düsseldorf
Senior Member
Hi,
I'd say it is not possible to achieve this with the standard WizardDialog as it extends TitleAreaDialog which creates a Label for the Title and a Text for the message:

You can just check the respective code of TitleAreaDialog:
   ...
   titleLabel = new Label(parent, SWT.LEFT);
   ...
   messageLabel = new Text(parent, SWT.WRAP | SWT.READ_ONLY);
   ...


That's why the message is wrapped whereas the title is not.

You might want to override the getInitialSize() method of TitleAreaDialog and introduce a MAX_DIALOG_WIDTH. But that would then be a hardcoded approach which you want to avoid.

After all you might be better off thinking about a shorter title.

Regards,
Thorsten

[Updated on: Mon, 07 October 2013 12:08]

Report message to a moderator

Previous Topic:Project Explorer Undo/Redo Operation
Next Topic:JFace Treviewer: How to handle a "Post"-Collapse/-Expand in TreeViewer
Goto Forum:
  


Current Time: Tue Apr 23 15:08:35 GMT 2024

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

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

Back to the top