CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    2

    text box properties



    I have a text box that I wish to do two things to:


    1. Allow selection of the text for copying, but not deleting or adding text.

    2. Insert new text into the bottom of the box, moving all other text up.


    If there is another control that will let me do these things easier, I would

    be very interested to hear about it.


    Salt





  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: text box properties

    you should be able to do this with the standard textbox that comes with VB.
    Set the Readonly property to true in VB 5 or 6 and you will be able to select text for copying but not for deleting. And, you won't be able to add text.
    To Append text to the end of the text simple do something like textbox1.text = textbox1.text & yournewtext or set the SelStart property to the length(textbox1.text) and the cursor will be at the end of the text in your textbox.


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

Featured