B4J Question Editable ComboBox TextChanged

BPak

Active Member
Licensed User
Longtime User
I have Two Editable ComboBox on a Form and need to get the Text from the Combos.

If an item is selected then it works fine but if a different entry is made I need to use it also.

Tried us ing code found on forum but it gives an error.

Thanks for any help.
 

Attachments

You can handle the ValueChanged event. It combo box.raised when the user presses enter or when the field loses focus:
Code: Copy
Sub ComboBox1_ValueChanged (Value As Object)
   Log(Value)
End Sub
Enter key does - yes.
Change focus to another control does not get value. ?
From combobox
 
Upvote 0
I've tested with two ComboBox and it did raise this event.
I do not see any lose focus event for combobox.
I type a word into a combo box edit and then click on another control.
No event from combo box is activated.
Must be a problem with my computer or setup of b4j .
Value changed only activates if I click enter after typing into combo box edit.
 
Upvote 0
Unfortunately, there is not an event like "LostFocus"; this is one of the first things I missed (B4A).



Edit: there is a similar event (FocusChanged with HasFocus = False) but it does not fire always

I deleted combos and used text field with table view. It is only an in house program I am making.
 
Upvote 0
Back
Top