Results 1 to 4 of 4

Thread: Disable TextBox without Scrollbars?

  1. #1

    Thread Starter
    Hyperactive Member Stiletto's Avatar
    Join Date
    Aug 2002
    Location
    Jerusalem, Israel
    Posts
    287

    Disable TextBox without Scrollbars?

    Hey,
    How can I disable a textbox, not indluding scrollbars?
    Or in other words, not allow the user to change the text, but allow him to scroll the textbox.
    How do I do that?

  2. #2
    Fanatic Member Armbruster's Avatar
    Join Date
    Sep 2002
    Location
    Maryland Heights, MO
    Posts
    857
    just lock it! (don't disable it)

    VB Code:
    1. Private Sub Form_Load()
    2.     Text1.Text = "Hey, How can I disable a textbox, not indluding scrollbars? "
    3.     Text1.Text = Text1.Text & vbCrLf & "Or in other words, not allow the user to change the "
    4.     Text1.Text = Text1.Text & vbCrLf & "text, but allow him to scroll the textbox. "
    5.     Text1.Text = Text1.Text & vbCrLf & "How do I do that"
    6.     Text1.Locked = True
    7. End Sub
    "Look! Up in the sky! It's a bird! It's a plane! It's Diaper-Head Boy! (there by my name!) Yes, Diaper-Head Boy, who disguised as my son, Seth, fights a never-ending battle for truth, justice and terrorizing my house!

    Resistance is futile, you will be compiled . . . Please!

  3. #3

    Thread Starter
    Hyperactive Member Stiletto's Avatar
    Join Date
    Aug 2002
    Location
    Jerusalem, Israel
    Posts
    287
    Wow, I didnt know about that...:?

  4. #4
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Even if it is locked you can still change the text but through code, so it is up to you. For example :

    VB Code:
    1. Private Sub Form_Click()
    2.  Text1.Text = "test"
    3. End Sub
    4.  
    5. Private Sub Form_Load()
    6.  Text1.Locked = True
    7. End Sub


    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