Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] setSelection() Update.

Apologies for updating my very first post here ;p

Naturally, I'm talking about swt.widgets.Combo.

Original message: ------------------------------------------------------------------------------------------
Hello,

I'm currently writing an auto completing combo box, and I have stubbed on unpleasant surprise - setSelection don't works as expected (it makes no difference at all). getSelection.toString shows that setting happens correctly, but text ether gets no selection or stays selected by default.
Is it really unimplemented or maybe I'm trying something wrong?
---
offending code:
            if (entries[i].toLowerCase().startsWith(text.toLowerCase())) {
                getCombo().select(i); //select, not setText. Else recursion thru ModifyListener starts
                Point selection = new Point(text.length() - 1, entries[i].length() - 1);
                getCombo().setSelection(selection);
                return;
            }

Respectfully,
Karlis Zigurs



Back to the top