Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Setting selection in JFace ComboViewer
Setting selection in JFace ComboViewer [message #292967] Fri, 14 October 2005 02:47 Go to next message
Eclipse UserFriend
Originally posted by: webapp.gmx.de

Hi,

how can I set the selection in a combobox using the JFace ComboViewer?
There's a method setSelection, but I don't know how to handle it.

Sorry, if this was asked before, but there's no search function available.

Thanks, Rudolf
Re: Setting selection in JFace ComboViewer [message #293039 is a reply to message #292967] Sun, 16 October 2005 09:08 Go to previous message
Eclipse UserFriend
It's actually quite easy. For example if we have JFace ComboViewer that contains the following String elements { "A", "B", "C" }

you can simply set the selection to "B" with the following call:
comboViewer.setSelection(new StructuredSelection("B"));
Previous Topic:Programmaticly force save of all "dirty" editors
Next Topic:issue with appletviewer on ubuntu linux 5.10
Goto Forum:
  


Current Time: Sun Jul 27 12:36:30 EDT 2025

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

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

Back to the top