BPak Active Member Licensed User Longtime User May 22, 2016 #1 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 CTC.zip CTC.zip 4.3 KB · Views: 477
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.
Erel B4X founder Staff member Licensed User Longtime User May 22, 2016 #2 You can handle the ValueChanged event. It will be raised when the user presses enter or when the field loses focus: Code: Copy Sub ComboBox1_ValueChanged (Value As Object) Log(Value) End Sub Upvote 0
You can handle the ValueChanged event. It will be raised when the user presses enter or when the field loses focus: Code: Copy Sub ComboBox1_ValueChanged (Value As Object) Log(Value) End Sub
BPak Active Member Licensed User Longtime User May 22, 2016 #3 Erel said: 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 Click to expand... Enter key does - yes. Change focus to another control does not get value. ? From combobox Upvote 0
Erel said: 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 Click to expand... Enter key does - yes. Change focus to another control does not get value. ? From combobox
Erel B4X founder Staff member Licensed User Longtime User May 22, 2016 #4 I've tested it with two ComboBox and it did raise this event. Upvote 0
BPak Active Member Licensed User Longtime User May 22, 2016 #5 Erel said: I've tested with two ComboBox and it did raise this event. Click to expand... 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
Erel said: I've tested with two ComboBox and it did raise this event. Click to expand... 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.
LucaMs Expert Licensed User Longtime User May 22, 2016 #6 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 Last edited: May 22, 2016 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
BPak Active Member Licensed User Longtime User May 22, 2016 #7 LucaMs said: 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 Click to expand... I deleted combos and used text field with table view. It is only an in house program I am making. Upvote 0
LucaMs said: 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 Click to expand... I deleted combos and used text field with table view. It is only an in house program I am making.