I wrote small program for search Person's Name via Text field as I can search in mobile phone Contacts.
I put 5 names in combo box, when I search 'a' ie wrote 'a' in textfield then it shows all 5 names in combo box pop up
because each have character 'a', then I select 3rd or 4th name by mouse, then it should show in Text field where I wrote 'a'.
Each time it replace 'a' in text field to 1st name in combo box, I want to write 2nd, 3rd character, or select from drop down list in combo box.
But I can't do that.
For reference here is my program
Millions saw the apple fall, but Newton asked why.
This is what happened when I ran and tried the app:
I typed in 'd' in the text field
The combobox opened and the names 'Adam', 'Dawson' showed in the list
And, the text field was populated with 'Adam' (it populates the first item/name from the opened/listed combobox).
At this stage, I can select another name/item from the combobox list and the textfield is populated with that selected one.
Now, if I press the <backspace> key (or button) ONCE it doesn't clear the character in the text field; the character keep populating back again and cursor returns back to its original position. But, if I press backspace persistently (keep it pressed) the action clears the textfiled. Also, I can clear the textfield by selecting the text in the textfiled using the mouse and deleting it.
Thats the current behaviour of the app.
The issue is to use the backspace key and the action should do what it does normally - move one character back while removing that character. And, let the user enter another character, etc.
At this point I have not attempted to solve the issue. The code need to be presented properly to read and understand . It requires proper formatting and with comments at appropriate places (so that one can understand what that bit of code is actually meant for), etc.