disabling user input in a .NET 2.0 Combo box control

This is a discussion on disabling user input in a .NET 2.0 Combo box control within the Windows Programming forums, part of the Platform Specific Boards category; hi all, Does anyone know a clean way to prevent the user from entering thier own text into a combo ...

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    50

    disabling user input in a .NET 2.0 Combo box control

    hi all,

    Does anyone know a clean way to prevent the user from entering thier own text into a combo box? I like the drop down menu over a list box style scrolling menu, but need to prevent the user from entering thier own text.

    thanks.

  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    I believe you want the CBS_DROPDOWNLIST style
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  3. #3
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Set the DropDownStyle property to DropDownList.

  4. #4
    Registered User
    Join Date
    Oct 2003
    Posts
    50
    thanks for your help, works perfectly.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  2. User determined input question
    By lyoncourt in forum C Programming
    Replies: 8
    Last Post: 09-30-2007, 06:10 PM
  3. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  4. Input Control
    By Unregistered in forum C++ Programming
    Replies: 11
    Last Post: 01-15-2002, 05:21 PM
  5. User Input without Dialog box?
    By Isometric in forum Windows Programming
    Replies: 2
    Last Post: 11-22-2001, 01:27 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21