Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Combo scroll area
SWT Combo scroll area [message #466819] Tue, 17 January 2006 17:30 Go to next message
Eclipse UserFriend
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 18:01 Go to previous messageGo to next message
Eclipse UserFriend
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 18:40 Go to previous messageGo to next message
Eclipse UserFriend
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] Tue, 17 January 2006 19:39 Go to previous message
Eclipse UserFriend
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 Jul 06 14:42:01 EDT 2025

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

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

Back to the top