|
Post by meerkat on Feb 28, 2019 5:23:40 GMT -5
I have a combobox that looks like this:
Combobox #main.cdb, dbsFile$(), [shoTbls] ,010,120,220,224
That works correctly and shows a list.
The label code is: [shoTbls] #main.cdb "select "; curDb$
wait
When I select a item from the combo I get an error: Unhandled exception this collection is empty
Works in LB4.5 not LB5
Where do I find documentation on the 'select' statement in LB5?
Thanks for the help..Dan
|
|
|
Post by alincon on Feb 28, 2019 10:06:58 GMT -5
In LB4.5 the syntax is:
#main.cbb "selectionindex? curDb" #main.cbb "selection? curDb$"
Does that not work in LB5?
r.m.
|
|
|
Post by meerkat on Feb 28, 2019 10:27:34 GMT -5
Yes it does.. What I was trying to do was force the selected item to show at the top of the combobox. Turns out it automatically does it - so no need for me to force it.
My other problem is how do you show multiple items in the combobox. I understand this will be available in later releases of LB5.
Thanks for the help.
|
|
|
Post by Carl Gundel on Feb 28, 2019 10:54:45 GMT -5
What does that mean, "show multiple items in the combobox"? You mean how to give it a list of things?
|
|
|
Post by meerkat on Feb 28, 2019 12:16:47 GMT -5
Well, maybe I'm missing something. I give it a list of about 20 items. I'd like about 10 of them to show up on the screen. Right now I only see one item. You have to click the down arrow to see the rest.
So How do I get more items to show on the screen??
Thanks for the help.. Dan
|
|
|
Post by Carl Gundel on Feb 28, 2019 12:21:35 GMT -5
Well, maybe I'm missing something. I give it a list of about 20 items. I'd like about 10 of them to show up on the screen. Right now I only see one item. You have to click the down arrow to see the rest. So How do I get more items to show on the screen?? Thanks for the help.. Dan That's what the down arrow is for, to show the list. What am I missing?
|
|
|
Post by meerkat on Feb 28, 2019 14:32:01 GMT -5
Yes I know.. But I want the screen to have 10 combobox items showing with a vertical bar without having to first click the down arrow. Only way I was able to get this in LB4 was with stylebits.
But what do I know? I've only written 1 program in LB4 so I probably don't know what I'm talking about...
But thanks for the help anyway... Dan
|
|
|
Post by Carl Gundel on Feb 28, 2019 15:07:55 GMT -5
Yes I know.. But I want the screen to have 10 combobox items showing with a vertical bar without having to first click the down arrow. Only way I was able to get this in LB4 was with stylebits. But what do I know? I've only written 1 program in LB4 so I probably don't know what I'm talking about... But thanks for the help anyway... Dan Didn't realize there is a stylebit for that. A listbox doesn't work just as well? You're saying that the dropdown list appears when the window opens and then disappears when you make a selection? EDIT: which stylebit are you using?
|
|
|
Post by Brandon Parker on Feb 28, 2019 15:53:31 GMT -5
I'm fairly certain that ComboBox style is CBS_SIMPLE according to MSDN. {:0) Brandon Parker
|
|
|
Post by meerkat on Feb 28, 2019 16:47:40 GMT -5
Here is what I was using in the LB4 program: Combobox #main.cdb, dbsFile$(), [dFile] ,010,120,220,224 Stylebits #main.cdb, 0, _CBS_DROPDOWN, 0, 0
Been a while since I wrote the LB4 program. Don't remember if the stylebits had anything to do with it right now. But the combobox would show as many items as it could according to the given height. I think it was about 10 items. With this statement in LB5 without the stylebits, I only get 1 item. To see the list you must click the down arrow. Maybe there is another way in LB5? How do I get the same effect in LB5?
Thanks for the help.. Dan
|
|
|
Post by Brandon Parker on Feb 28, 2019 20:41:10 GMT -5
That makes sense; removing the CBS_DROPDOWN ComboBox style removes the part that keeps the list portion hidden unless the user selects the drop-down button.
{:0)
Brandon Parker
|
|