Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to change default height of ListSelectionDialog(How to change default height of ListSelectionDialog)
How to change default height of ListSelectionDialog [message #1759301] Mon, 10 April 2017 03:40 Go to next message
Suresh P is currently offline Suresh PFriend
Messages: 27
Registered: May 2013
Junior Member

Can you let me know how to change the default height of ListSelectionDialog (org.eclipse.ui.dialogs.ListSelectionDialog).
Not able to find any relevant methods in the JavaDoc for this functionality.

ListSelectionDialog dialog = 
				   new ListSelectionDialog(shell, elements, ArrayContentProvider.getInstance(),
				            new LabelProvider(), "Select from Below");


Re: How to change default height of ListSelectionDialog [message #1759825 is a reply to message #1759301] Tue, 18 April 2017 09:14 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 876
Registered: January 2012
Senior Member

See the `getInitialSize()` method, inherited from Dialog and Window. Like most dialogs, the ListSelectionDialog tries to calculate an optimal size based on its contents. If you want to set an explicit size, you'll need to subclass and override `getInitialSize()`.

Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:Creating and starting non e4 model bundle
Next Topic:MCompositePart creation with EPartService.createPart()?
Goto Forum:

Current Time: Wed Sep 23 11:12:36 GMT 2020

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

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

Back to the top