Results 1 to 10 of 10

Thread: additem

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2004
    Posts
    908

    additem

    cboRequestor.AddItem ("X")
    cboRequestor.AddItem ("y")
    cboRequestor.AddItem ("z")

    i am using the style 'dropdown list' which i intend to use.
    however how do i add to the statments above to make z item the first to show instead of x..
    and currently the combo is blank when first load ...how do i make the first item of the list to be show straight after the loading of form?

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    VB Code:
    1. cboRequestor.Text = "z"

    As long as the item exists, that will work.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    Goh


    cboRequestor.Text = cboRequestor.List(0) will allow you to show which ever item in your list that you want. Where 0 is the list index of the item you want to display.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2004
    Posts
    908
    so the list(0) is the first item that will be shown from my objRS ?( for my case i mean)

  5. #5
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    Goh,

    This is correct. If you mean the combo listbox.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2004
    Posts
    908
    so the only way to test the index number for a particular item is to try out one by one right?

  7. #7
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Originally posted by Goh
    so the only way to test the index number for a particular item is to try out one by one right?
    Not really, do a search for CB_FINDSTRINGEXACT and you will find an API example that can do it in one call.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2004
    Posts
    908
    wat is CB_FINDSTRINGEXACT ???

  9. #9
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Its an API constant used by the SendMessage API. Do a search and you will see.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2004
    Posts
    908
    thanks

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