Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » undo-redo dropdown list
undo-redo dropdown list [message #467350] Mon, 30 January 2006 05:37 Go to next message
Eclipse UserFriend
Originally posted by: osipov.appliedtech.ru

I am adding undo-redo features to my view. For this purpose I've added this
buttons: undo and redo to local toolbar of my view. Buttons use
Action.AS_DROP_DOWN_MENU style, so that you can undo or redo several actions
at a time.
The question basically is if I can selecte several items at a time in my
drop down meny, indicating that selected action will be undone or redone as
well for selected items in my meny.
Actually, I would like to have not a drop down menu, but drop down list, eh?
Is anything of that possible?
Thanks a lot in advance.
Re: undo-redo dropdown list [message #467354 is a reply to message #467350] Mon, 30 January 2006 08:36 Go to previous messageGo to next message
Jeremy Dowdall is currently offline Jeremy DowdallFriend
Messages: 22
Registered: July 2009
Junior Member
in JFace, you can use a ControlContribution to add any type of control
to your toolbar:

getViewSite()
.getActionBars()
.getToolBarManager()
.add(new ControlContribution("Custom") {
protected Control createControl(Composite parent) {
Combo combo = new Combo(parent, SWT.DROP_DOWN);
combo.add("Test1");
combo.add("Test2");
return combo;
}
});



Peter Osipov wrote:
> I am adding undo-redo features to my view. For this purpose I've added this
> buttons: undo and redo to local toolbar of my view. Buttons use
> Action.AS_DROP_DOWN_MENU style, so that you can undo or redo several actions
> at a time.
> The question basically is if I can selecte several items at a time in my
> drop down meny, indicating that selected action will be undone or redone as
> well for selected items in my meny.
> Actually, I would like to have not a drop down menu, but drop down list, eh?
> Is anything of that possible?
> Thanks a lot in advance.
>
>
Re: undo-redo dropdown list [message #467360 is a reply to message #467354] Mon, 30 January 2006 11:14 Go to previous message
Eclipse UserFriend
Originally posted by: osipov.appliedtech.ru

Ok, it looks fine, but just not the way I want it. I still need style of
AS_DROP_DOWN_MENU for button on my toolbar, but I want a combobox to drop
down not a menu list.

> in JFace, you can use a ControlContribution to add any type of control
> to your toolbar:
>
> getViewSite()
> .getActionBars()
> .getToolBarManager()
> .add(new ControlContribution("Custom") {
> protected Control createControl(Composite parent) {
> Combo combo = new Combo(parent, SWT.DROP_DOWN);
> combo.add("Test1");
> combo.add("Test2");
> return combo;
> }
> });
>
>
>
> Peter Osipov wrote:
> > I am adding undo-redo features to my view. For this purpose I've added
this
> > buttons: undo and redo to local toolbar of my view. Buttons use
> > Action.AS_DROP_DOWN_MENU style, so that you can undo or redo several
actions
> > at a time.
> > The question basically is if I can selecte several items at a time in my
> > drop down meny, indicating that selected action will be undone or redone
as
> > well for selected items in my meny.
> > Actually, I would like to have not a drop down menu, but drop down list,
eh?
> > Is anything of that possible?
> > Thanks a lot in advance.
> >
> >
Previous Topic:Problem with SWT.WRAP (GTK2)
Next Topic:Dynamically Change Layout
Goto Forum:
  


Current Time: Tue Apr 16 06:54:46 GMT 2024

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

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

Back to the top