Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a textbox filled with some dynamic text. I want that I can make the textbox programmaticaly (or automatically) so high that i don't have to scroll to so all of the content (all the content should be displayed right on the screen).

 

How to do this???

Visit http://www.nico.gotdns.com

 

Now ONLINE!

  • Leaders
Posted

not sure if this will give you any ideas , but you could resize ( depending on the size of the text ofcourse ) on the amount of lines :

   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       Dim x As Integer
       Dim i As Integer = 20
       For x = 0 To TextBox1.Lines.GetUpperBound(0)
           If Not x = 0 Then
               i += 20
           End If
       Next
       TextBox1.Height = i
   End Sub

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...