Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Combobox in toolbar
Combobox in toolbar [message #449105] Wed, 10 May 2006 08:23 Go to next message
Eclipse UserFriend
hello

does someone know how to put a combobox in the toolbar? i see some button
styles only.

regards green
Re: Combobox in toolbar [message #449107 is a reply to message #449105] Wed, 10 May 2006 09:21 Go to previous messageGo to next message
Eclipse UserFriend
green wrote:

> does someone know how to put a combobox in the toolbar? i see some
> button styles only.

You can do something like this:

ToolItem sep = new ToolItem(bar, SWT.SEPARATOR);
final Combo combo = new Combo(bar, SWT.READ_ONLY);
combo.setItems(new String[]{"A", "B", "C"});
combo.pack();
sep.setWidth(combo.getSize().x);
sep.setControl(combo);

/Henrik
Re: Combobox in toolbar [message #449109 is a reply to message #449107] Wed, 10 May 2006 10:14 Go to previous message
Eclipse UserFriend
thanks, where do i put this code in?

green
Previous Topic:Adding a submenu to File -> New
Next Topic:RCP external library importing
Goto Forum:
  


Current Time: Mon Sep 01 03:06:22 EDT 2025

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

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

Back to the top