Results 1 to 4 of 4

Thread: C#: ReadOnly Combo Box

  1. #1

    Thread Starter
    Addicted Member DJ_Catboy's Avatar
    Join Date
    Jan 2003
    Location
    Suffolk, UK
    Posts
    159

    C#: ReadOnly Combo Box

    Hi,

    I want to use a combo box that has the ability to use the drop down but not accept keystrokes. There is no "readonly" property like there is on a text box - does anybody have any ideas how I might achieve this? Ideally I don't want to use API calls.

    Thanks in advance,
    DJ

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Wouldn't a ListBox do exactly that?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Addicted Member DJ_Catboy's Avatar
    Join Date
    Jan 2003
    Location
    Suffolk, UK
    Posts
    159
    Yes, I suppose it would - however, I have to make my app look like another app that is written by somebody else, and unfortunately this other app has combo boxes that cannot be written into directly and therefore I need to use combo boxes.

    This is quite simple in VB6 using a simple sendmessage call, but I don't wish to use API's in a .NET application.

    Thanks anyway,
    DJ

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    But a ListBox looks the same as a ComboBox, or at least it should.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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