Wish B4XComboBox event or property

MrKim

Well-Known Member
Licensed User
Longtime User
B4XComboBox only has the one event. It would be really nice to have a dropdown event or the ability to set the width of the dropdown. I am always scratching for space and frequently have more than one column of data in a combo. The user needs this information to make a decision, but actually only need to display one column after the selection is made.
Here is an extreme example from Access where the user is selecting an item number:
1593758827763.png

To be able to set the dropdown width would be very nice.
If at least had an on enter/exit event I could set/unset the width of the box.
 

Attachments

  • 1593758789202.png
    1593758789202.png
    50.7 KB · Views: 236

MrKim

Well-Known Member
Licensed User
Longtime User
Increasing (setting) the dropdown width would not allow you to show that data easily; that's a data grid.
I understand that. I can format the data in the combo box. What I may have to do is put a text box with a click event that opens the combo or a list box. I didn't think about that last night when I wrote this :p I have been working the same way for so long sometimes I get tunnel vision.
 

LucaMs

Expert
Licensed User
Longtime User
I understand that. I can format the data in the combo box. What I may have to do is put a text box with a click event that opens the combo or a list box. I didn't think about that last night when I wrote this :p I have been working the same way for so long sometimes I get tunnel vision.
... or create a custom view, with an EditText, a panel that opens (shows) on click on the EditText and then load a layout containing what you want (xCustomListView, B4XTableView or whatever) in the panel at runtime.
 

MrKim

Well-Known Member
Licensed User
Longtime User
... or create a custom view, with an EditText, a panel that opens (shows) on click on the EditText and then load a layout containing what you want (xCustomListView, B4XTableView or whatever) in the panel at runtime.
For some reason that seems overly complex to me. Also, If I keep loading/unloading the view I have to get the data for the lisview over and over. Simpler to just add a listview and show/hide it when you enter/exit the edit text. It gets the data on page open.
 
Top