Results 1 to 5 of 5

Thread: Combo box locked

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2004
    Posts
    220

    Combo box locked

    Hi, i am trying to lock the combo box so that user can't type in combo box, but they can still select 1 from the list

    also how can i populate what the combo box say into a label

    i am currently doin
    VB Code:
    1. lbldatetime.caption = cboHr.text

    but it aint working :s


    tnx adz

  2. #2
    Lively Member
    Join Date
    Aug 2003
    Location
    Philadelphia, Pa.
    Posts
    123
    select style #2 for it. Then the user cant type into it.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2004
    Posts
    220
    Great but how can i select the txt i want in the to start with
    coz at mo it comes up the the combo's name

    and how do i populate the label with it
    Last edited by k0r54; Jun 16th, 2004 at 12:34 PM.

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    When you set the style to 2, the text must exist in the list in order to be displayed.

    The control's name should only be there at design time.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654
    If you want the first element to be automatically selected when you've populated the ComboBox, insert Combo1.ListIndex = 0 after filling the combo.

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