Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7529119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:34:24+00:00 2026-05-30T04:34:24+00:00

what i am trying to archive here is to traverse within controls using the

  • 0

what i am trying to archive here is to traverse within controls using the UP and DOWN arrow keys
the code goes something like this in the display object. Might seem strange but this is a requirement :-/

displayObj.addFilter(SWT.KeyDown,new Listener() {
    public void handleEvent(Event event) {
        Control ctrl= (Control) event.widget;
        if(event.keyCode==SWT.ARROW_UP) {                   
            ctrl.traverse(SWT.TRAVERSE_TAB_PREVIOUS);
        } else if(event.keyCode==SWT.ARROW_DOWN) {
            ctrl.traverse(SWT.TRAVERSE_TAB_NEXT);
        }
    }
});

this works fine for the texts and combo boxes. But the third field is a Button (compositeObj,SWT.CHECK) at which point this doesn’t work because a SWT.FocusOut event is generated and the focus moves to the next button ‘OK’ ‘Cancel’ instead of the combobox that sits immediately afterwards. The tab traversal correctly happens in correct order as in text, text, button , combo , button and button.
Cannot use a FocusListener because there is no way to handle the UP and DOWN arrow events separately.

Are there any other ways of doing this?. Thanks in advance for any replies.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:34:27+00:00Added an answer on May 30, 2026 at 4:34 am

    Using TraverseListener as shown below on the buttons solved the problem.

    cancelButton.addTraverseListener(new TraverseListener () {
    public void keyTraversed(TraverseEvent e) {
    e.doit=false;
    if (e.keyCode==16777218) {
    userIdText.forceFocus();
    } else if (e.keyCode==16777217) {
    connectButton.forceFocus();
    }
    else {
    //do nothing,i guess;
    }
    }
    });
    

    Thanks anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to parse data from Archive.org's search functionality. The data looks like this:
Trying to follow this example to make it work: http://weblogs.asp.net/kiyoshi/archive/2008/10/08/wcf-using-webhttpbinding-for-rest-services.aspx Here is my App.config
I am trying to archive, unarchive objects using NSKeyedArchiver, NSKeyedUnarchiver, NSCoding (initWithCoder, encodeWithCoder methods)
Trying to get my css / C# functions to look like this: body {
I'm trying to get jquery intellisense working per the instructions here: http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx#7117822 I'm not
I've been trying to write a python code which can archive the files of
While trying to zip an archive using the java.util.zip I ran into a lot
I'm trying to follow this blog post: http://blogs.msdn.com/b/carlosfigueira/archive/2011/04/19/wcf-extensibility-message-inspectors.aspx My aim is to somehow get
Here is the directory structure of the folder I am trying to archive: DIR
I am trying to archive my UIWebView object using NSKeyedArchiver and restore it later

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.