Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Combo scroll area
SWT Combo scroll area [message #466819] Tue, 17 January 2006 22:30 Go to next message
Dhiresh Patel  is currently offline Dhiresh Patel Friend
Messages: 86
Registered: July 2009
Member
I am displaying items using comboviewer with ReadOnly style
I want to display items to a length of full viewable page so the user
doesn't have to scroll down after e.g 5 items or so meaning he is able to
view 50 items instead of having scroll bars after just 5 items.

How do I do that?

Dhiresh Patel
Re: SWT Combo scroll area [message #466821 is a reply to message #466819] Tue, 17 January 2006 23:01 Go to previous messageGo to next message
Jeremy Dowdall is currently offline Jeremy DowdallFriend
Messages: 48
Registered: July 2009
Member
perhaps combo.setVisibleItemCount(count) is what you're looking for


dhiresh patel wrote:
> I am displaying items using comboviewer with ReadOnly style
> I want to display items to a length of full viewable page so the user
> doesn't have to scroll down after e.g 5 items or so meaning he is able
> to view 50 items instead of having scroll bars after just 5 items.
> How do I do that?
>
> Dhiresh Patel
>
Re: SWT Combo scroll area [message #466822 is a reply to message #466821] Tue, 17 January 2006 23:40 Go to previous messageGo to next message
Dhiresh Patel  is currently offline Dhiresh Patel Friend
Messages: 86
Registered: July 2009
Member
Thank you jeremy - it does work. There is one more followup to above
question.
I want to limit the combo box display area to the size of the window.
How do I go about doing that?

Thanks for all your help,

Dhiresh
Re: SWT Combo scroll area [message #466823 is a reply to message #466822] Wed, 18 January 2006 00:39 Go to previous message
Jeremy Dowdall is currently offline Jeremy DowdallFriend
Messages: 48
Registered: July 2009
Member
off hand I think you can do the following:

int height = the height you want the list to be (eg. the distance from
the bottom of the combo to the bottom of the window)
combo.setVisibleItemCount(height / combo.getItemHeight());


cheers!

Dhiresh wrote:
> Thank you jeremy - it does work. There is one more followup to above
> question.
> I want to limit the combo box display area to the size of the window.
> How do I go about doing that?
>
> Thanks for all your help,
>
> Dhiresh
>
Previous Topic:CheckboxTableViewer: set the checkboxes programmatically
Next Topic:plz help! how we can use the FieldEditorPreferencePage with SWT controls
Goto Forum:
  


Current Time: Sun Nov 19 21:50:54 GMT 2017

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

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