The Artima Developer Community
Sponsored Link

Java Answers Forum
SWT Accelerartor

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Gadi

Posts: 2
Nickname: gadi
Registered: Jul, 2004

SWT Accelerartor Posted: Jul 10, 2004 11:33 AM
Reply to this message Reply
Advertisement
I'm trying to use the the keyboard keys as accelerators for my menu items.
I don't know why this doesn't work : (I only hear a ping noise)

Menu menu = new Menu(gui.questionList);
MenuItem miNewVrs = new MenuItem(menu,SWT.NULL);
miNewVrs.setText("Create Ne&w Version\tCtrl+w");
miNewVrs.setAccelerator(SWT.CTRL + 'w');
miNewVrs.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent e){
// call a function
}
});

I have all of the relevant imports from SWT
Thanks,
Gadi

Topic: do while help Previous Topic   Next Topic Topic: read a text file/file is  compressed

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use