Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Accelerate Keys (CTRL+C,CTRL+V,CTRL+X) of Text widget do not work in MultipageEditorPart
Accelerate Keys (CTRL+C,CTRL+V,CTRL+X) of Text widget do not work in MultipageEditorPart [message #438109] Wed, 16 June 2004 11:41
Hank is currently offline HankFriend
Messages: 10
Registered: July 2009
Junior Member
From: "Hank" <hzhou@actuate.com>
Subject: Re: Accelerate Keys (CTRL+C,CTRL+V,CTRL+X) of Text widget do not
work in MultipageEditorPart
Date: Wednesday, June 16, 2004 11:29 AM

Can somebody help? The original code is generated by EMF. What should do?
Should I add keylistener to the Text widget? But I think there must be a
simple way to do this, because accelerate keys are automatically enabled
when create a Text widget in a shell or WizardPage. How come it doesn't work
in MultipageEditorPart?
"Hank" <hzhou@actuate.com> wrote in message news:calicn$qfl$1@eclipse.org...
> Followed is the sample code. Accelerate keys do not work on "userText",
but
> the popup menu when right clicking the mouse can work.
> ---------------------------------------------------
> public class TestEditor
> extends MultiPageEditorPart
> implements IEditingDomainProvider, ISelectionProvider, IMenuListener
> {
> Text userText;
> ...
> public void createPages()
> {
> Composite composite = new Composite(getContainer(), SWT.NONE);
> GridLayout layout = new GridLayout();
> composite.setLayout(layout);
> layout.numColumns = 2;
>
> userText = new Text(composite, SWT.BORDER);
> userText.setVisible(true);
> userText.setEnabled(true);
> int index = addPage(composite);
> setPageText(index, "MyPage");
> setActivePage(index);
> }
> ...
> }
> ----------------------------------------------------------
>
> "Douglas Pollock" <douglas.pollock@magma.ca> wrote in message
> news:caks1c$1do$2@eclipse.org...
> > eclipse.platform wrote:
> > > I created a page (a Composit) in MultipageEditorPart, and added some
> Text
> > > to the page. But "CTRL+C", "CTRL+V" and other accelerate keys do not
> work
> > > on the Texts I added. Why?
> > > And it is wierd that it works well when right clicking the mouse, and
> > > choose "Copy"/"Paste" on the popup menu.
> > > What should I do to make those Texts respond to key events?
> >
> > Could you please attach some sample code showing the problem?
> >
> >
> >
> > cheers,
> > d.
>
>
Previous Topic:Extending TextEditor by modifying the StyledText and TextLayout classes
Next Topic:Tree or TreeViewer
Goto Forum:
  


Current Time: Thu Apr 25 11:43:19 GMT 2024

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

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

Back to the top