Click to See Complete Forum and Search --> : ColumnCount


alexK
February 5th, 2000, 08:00 PM
I am not sure how to set this option for a
combobox. It seams like it is not in the list of properties.
Thank you!
Alex

Lothar Haensler
February 7th, 2000, 01:53 AM
you are right. there is no such thing as a multi-column combobox in VB's builtin combobox.
You need to get a third-party control to get what you want.
...or implement one yourself.

alexK
February 7th, 2000, 07:47 AM
Actually I found a ColumnCount in MSDN library
properties of ComboBox. Microsoft Forms object library 2.0 (FM20.dll) implements the combobox that have columnCount property. I don't know however what is this library for. Have you heard about it?

Lothar Haensler
February 7th, 2000, 07:50 AM
the Microsoft Forms Library comes with Office 2000. I haven't used it.

Lothar Haensler
February 7th, 2000, 08:02 AM
alexK, you are a genius!
That's really cool. That stuff was installed on my machine and I didn't even know it.
here is a sample for a multi-column combobox (columncount set to 2):

ListBox1.ColumnCount = 3

ListBox1.AddItem "Row 1, Col 1"
ListBox1.List(0, 1) = "Row 1, Col 2"
ListBox1.List(0, 2) = "Row 1, Col 3"

ListBox1.AddItem "Row 2, Col 1"
ListBox1.List(1, 1) = "Row 2, Col 2"
ListBox1.List(1, 2) = "Row 2, Col 3"

it works great!