Results 1 to 4 of 4

Thread: Columns in Combo Box

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Location
    Nigeria
    Posts
    66

    Columns in Combo Box

    Guys,

    Please is there any way I can have more than one coulmn in a Combo Box? I want a situation where the code and description of an object will appear in diff. Col

    combo1.addItem rstfield.field(0)

    This is for a column. I want the code and desc to be in different column.

    Thanks All

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  3. #3
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    This is a control I wrote once. It gimmicks a combo box but has a listview as the drop-down. Open the LVComboDemo.vbg project group to see a simple example on how it works.
    Attached Files Attached Files
    Last edited by Joacim Andersson; Apr 28th, 2003 at 08:26 AM.

  4. #4
    Hyperactive Member FUBAR's Avatar
    Join Date
    Jan 2000
    Posts
    307
    another way you could make it look like you have 2 colums is by using spacing....

    Combo1.AddItem strFirst & Space(20 - Len(strFirst)) & strSecond

    you need to change the font of the combo box to courior new, because each letter takes up the same amount of space in this font.

    here is what is looks like, if i get this to come out right on the forum......
    VB Code:
    1. [FONT=courier new]
    2. ABCD                90
    3. ABCHUI              80
    4. BLAHOPILO           15
    5. OPDILT              13
    6. [/FONT]

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