CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: ColumnCount

  1. #1
    Join Date
    Oct 1999
    Location
    US
    Posts
    34

    ColumnCount

    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


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: ColumnCount

    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.


  3. #3
    Join Date
    Oct 1999
    Location
    US
    Posts
    34

    Re: ColumnCount

    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?


  4. #4
    Join Date
    May 1999
    Posts
    3,332

    Re: ColumnCount

    the Microsoft Forms Library comes with Office 2000. I haven't used it.


  5. #5
    Join Date
    May 1999
    Posts
    3,332

    Re: ColumnCount

    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!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured