Results 1 to 3 of 3

Thread: combo box set default text in

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2004
    Location
    Australia
    Posts
    1

    Talking combo box set default text in

    Hi all

    Can someone help me with setting default text in the top of the combo box .. I have tried

    CboCity.Text. Selected(6) = true

    and I have tried
    Cbocity.text = CboCity.List(6) = True

    Where CboCity is my combobox and (6) is the index of the item I want to display first

    Thanks Tan
    Tan from Oz

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    Use its ListIndex Property:

    VB Code:
    1. ComboBox.ListIndex = 2 'the 3rd item


    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Or :

    VB Code:
    1. Cbocity.text = CboCity.List(6)


    Has someone helped you? Then you can Rate their helpful post.

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