Results 1 to 5 of 5

Thread: Textbox with no Cursor?

  1. #1

    Thread Starter
    Hyperactive Member neef's Avatar
    Join Date
    Dec 2001
    Location
    Boston
    Posts
    311

    Textbox with no Cursor?

    I have a string that will be of varying lengths. I want to display this string in a textbox so scroll bars will appear if the string is larger than the size of the text box. This info is read only - I don't want to give the user any input with it. I still see a cursor and my string highlighted even with the ReadOnly set to true.

    Is there any way to disable the cursor altogether in a textbox so nothing is highlighted? Maybe I'm not using the best control for this, but I don't want to use a label.

    I generate this textbox at run time, if that matters at all.

    Thanks.
    Intermediate Level Programmer Extraordinaire

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: Textbox with no Cursor?

    that's the default behaviour of a textbox. why not a label?

  3. #3

    Thread Starter
    Hyperactive Member neef's Avatar
    Join Date
    Dec 2001
    Location
    Boston
    Posts
    311

    Re: Textbox with no Cursor?

    I'd use a label if it had a vertical scroll-bar for long text lengths. It's the fact that I don't know exactly what the string length will be that led more to use a textbox.
    Intermediate Level Programmer Extraordinaire

  4. #4
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: Textbox with no Cursor?

    try putting a label on a panel with the panel's autoscroll property set to true

  5. #5

    Thread Starter
    Hyperactive Member neef's Avatar
    Join Date
    Dec 2001
    Location
    Boston
    Posts
    311

    Re: Textbox with no Cursor?

    That's a good idea. Thanks!
    Intermediate Level Programmer Extraordinaire

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