开发者

Problem with SWT Combobox addSelectionListener()

开发者 https://www.devze.com 2023-04-02 20:44 出处:网络
cmbCategory.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) {
cmbCategory.addSelectionListener(new SelectionAdapter() {
    @Override
    public void widgetSelected(SelectionEvent e) {

        //Do things

    }
});

The above code works just fine when I make selection using the control itself, but does not fire when I try changing the index programmatically.

Can anyone he开发者_如何学运维lp me?


Maybe this could work:

cmbCategory.addModifyListener(new ModifyListener(){
    @Override
    public void modifyText(ModifyEvent event) {

        //Do things

    }
});
0

精彩评论

暂无评论...
验证码 换一张
取 消