Combo Box with Dropdown style. List populated programmatically with varying data. Is it possible to change the depth of the dropdown list based on the number of values and make it scrollable.
Aiden,
I'm not sure if this is what you are after but if you pre-size your popup to be as tall as possible then the actual dropdown will vertically shrink itself according to the number of items you populate in the LIST property. That should resolve your first request. Then if you make sure the Vert scroll bar option is check it will automatically add a scrollbar if the length of your list exceeds the maximum size that you established at design time.
One caveat, if you don't populate anything into your combobox then the dropdown will appear as long as your originally designed it to be and it will be blank.
Sized dropdown to max depth of window. Works, sort of. The first time I click on the dropdown arrow the box displays maximum length regardless of number of items. Second click on dropdown arrow displays only number of items. Same whether list populated on dropdown or gotfocus event.
Aiden,
Have you tried populating the list on the CREATE event of the window?
Sean
Using the CREATE event works but I would prefer to populate the list at the DROPDOWN event. I have 2 combo boxes that are part of a 3 part key. Each list requires a fair bit of processing to populate and are only required if the dropdown is activated.
Try playing with the REDRAW property of the control to see if that makes a difference.
Sean
That worked, life is again in perfect harmony.