Results 1 to 7 of 7

Thread: Is this possible??

  1. #1

    Thread Starter
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Is this possible? My boss does it in Delphi. Can i display two fields into a list box? One of the fields will be the one saved into the database, the other just for means of lookup capability.. For example

    Field 1 Field 2
    010 Plant Name

    Fields 2 is only there to give a name to "010"

    thanks

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    I think you can enter columns to listboxes, anyway, use the ListView instead, it has a lot of advantages compared to the listbox, including the look.

    To add a ListView Press CTRL + T and select Microsoft Windows Common Controls and the icon of the ListView must now appear in your toolbox.

    Reply if you need help

    [Edited by Jop on 11-08-2000 at 05:36 PM]
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  3. #3

    Thread Starter
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496

    thanks jop

    looks pretty cool, although, how do you add items to the list?? I see there isn't a datasource property or add item? What am i overlooking?

  4. #4
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Oh sh*t, Databases.

    I'm pretty sure it's possible, but I've no idea, I never worked with databases (and never needed to), so I'm afraid I can't help you on this one... sorry...
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  5. #5
    Hyperactive Member barrk's Avatar
    Join Date
    Sep 2000
    Location
    My own little world
    Posts
    274
    for n = 0 to rs.recordcount - 1
    mylistbox.additem rs.field1, n
    rs.movenext
    next

  6. #6

    Thread Starter
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496

    ..

    Bark, does that work for the listview also, or just simple list boxes?

  7. #7
    Hyperactive Member barrk's Avatar
    Join Date
    Sep 2000
    Location
    My own little world
    Posts
    274

    Here's some better help. Sorry for the confusion.


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