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 8569767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:24:49+00:00 2026-06-11T18:24:49+00:00

I am writing an RCP application in eclipse that contains a combobox, and upon

  • 0

I am writing an RCP application in eclipse that contains a combobox, and upon selecting any of its items, a selection event is being fired and some random code comes in action. The listener looks something like this:

randomComboBox.addSelectionListener(new SelectionListener(){

    @Override
    public void widgetSelected(SelectionEvent e) {
        // random code
    }

    @Override
    public void widgetDefaultSelected(SelectionEvent e) {
        // TODO Auto-generated method stub
    }

});

My question is: is it possible to fire the event from the code? For example if I add:

randomComboBox.select(0);

no event is being fired. In this case, do I have to write my own listener?

  • 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-06-11T18:24:50+00:00Added an answer on June 11, 2026 at 6:24 pm

    The select method of the combo box sends an event of the type SWT.Modify when it changes the selection, so you could use a ModifyListener instead of a SelectionListener.

    Actually, the ModifyListener listens to changes in the text field of the combo box, this means it reacts to the text change that is caused by the selection. This also means that it will be fired if that text is changed by other paths (e.g. user entries in the combo text field).

    Keeping that behaviour in mind, a ModifyListener might be an option.

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

Sidebar

Related Questions

I am writing an Eclipse RCP-based application and am trying to draw a rectangle
I am writing an Eclipse RCP application in which multiple threads will update the
I'm writing a wizard for an Eclipse RCP application. After doing some processing on
Writing a client application that sends images to a server via a webservice. As
I'm trying to write an Eclipse rcp application using only jruby, or at least
I'm writing an RCP application plug-in. I want to make a set of objects
I have an Eclipse RCP application with a sort of three column layout: The
I'm writing an Eclipse RCP and I want to ask the user whether to
Background Our Eclipse RCP 3.6-based application lets people drag files in for storage/processing. This
I am writing an eclipse RCP app and I am trying to use a

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.