Results 1 to 10 of 10

Thread: Multi Column Listbox

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    4

    Question Multi Column Dropdown Combo Box

    I want to use a multi column (db)listbox/ Combo Box as with Access 2000.
    Part Number and Description in two columns in a VB listbox/Combo box.
    I have got around it by using a query which combines both fields and spaces between based on the length of the part number. Only annoying thing with this method is that it requires fixed size fonts to line up correctly.
    Can I add in the Access 2000 component, or any other way. Any ideas?

    Regards

    Alan.



    [Edited by Alan O'Keeffe on 08-23-2000 at 03:17 PM]

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    How about using the ListView control?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    4

    Question

    That's an idea but the original Access program uses drop down combos which I'm trying to replicate, also the listview can't be bound.

    Thanks for the help anyway.

    Alan

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Ah...I see. I think MSDN has some info on customising the Combo Boxes. Look under the Platform SDK.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982
    I am at home at the moment so can't test this but have you tried adding a tab character instead of spaces. I think there should be a constant declared for it something like vbTab. Or using the CHR() function. The other option I suppose is to use a bound datagrid with 2 columns.


    Things I do when I am bored: DotNetable

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    4

    Question

    Hi David,

    VBtab and chr$(9) act like a group of spaces, about 6. This has the same effect as space$(6). The only way around it is to use courier or terminal font.

    The dataGrid won't act as a dropdown combo.

    If you look at Access 2000 you can set the columns in
    the listbox and the combobox, then fill the columns individually.

    Any ideas about added this component into VB?

    Thanks for your ideas,

    Alan.

  7. #7
    Junior Member
    Join Date
    Aug 2000
    Location
    Manila, Philippines
    Posts
    16
    Hi David,

    I had the same problem when I first moved from Access to VB. It was extremely frustrating to find out that VB, unlike Access, does not provide multicolumn combo boxes, multicolumn listboxes, and drop down lists for grid cells. Instead of struggling with VB's primitive controls =), I took the easy way out and tried 3rd party ActiveX controls like APEX True DBList and Sheridan DataWidgets. I am currently using the APEX control.

  8. #8
    Junior Member
    Join Date
    Aug 2000
    Location
    Manila, Philippines
    Posts
    16
    Sorry. My previous post was supposed to be addressed to Alan, not David.

  9. #9
    Junior Member
    Join Date
    Aug 2000
    Location
    Manila, Philippines
    Posts
    16
    I just read a suggestion in another forum. Add Microsoft Forms 2.0 Object Library to your components. The combo box and list box included supports multiple columns. I think these are the standard controls of Visual FoxPro. (How come they have better controls than we do???)

  10. #10

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    4

    Wink

    That's it, Jason.

    MicroSoft Forms has a listbox and combobox that support multi columns. Just tested it, seems to work fine.

    Thanks for the help.

    Alan.

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