10-13-2011 07:41 AM
In standart BB applications entering a characters starts searching immediately even if a searchable list isn't focused. I need to do the same.
I have KeywordFilterField on my screen. When it's in focus search works well.
To implement search when it isn't in focus I override KeyChar event:
kff.setFocus();
kff.getKeywordField().setFocus();
kff.setLabel("");
if (c.equals(" ") == false) {
kff.setKeyword(mediaKeywordFilter.getKeyword() + a);
}kff - my KeywordFilterField, c - character that was entered.
It's working but keyword looks inactive (gray like standart "Search:"). Only the second character looks active (because kff is in focus).
In addition when I delete character that is gray my list doesn't update. Only if I push delete again it updates.
I guess there are other approaches.
Thank you for any help.