Results 1 to 2 of 2

Thread: word wrap

  1. #1

    Thread Starter
    Hyperactive Member ravi15481's Avatar
    Join Date
    Aug 2002
    Location
    INDIA
    Posts
    421

    word wrap

    hi friends,
    how to wrap the text . i know i can do it just but setting the wordwrap property to true but i don't wanna do that i want to do it programmatically b'coz i have to add few spaces at the beginnng of every line that is wrapped.

    OR

    just give me a solution to add spaces at the start of every line in a richtext box control where the text is wrapped.

    thanx,
    A good friend...

  2. #2
    Fanatic Member Mr.No's Avatar
    Join Date
    Sep 2002
    Location
    Mauritius
    Posts
    651
    You didn't specify which control you were using, Textbox or RichTextbox.

    If you are using a TextBox or RichTextbox
    Set the Multiline property to true and include a vbCrLf where you want a line break.

    If you are using a Label control
    Set the WordWrap property to True and include a vbCrLF where you want the line break.

    e.g

    Code:
    With txtData
      .Multiline = True
      .Text = "This is line one " & vbcrlf & "This is line two"
    End With
    Using VB.NET 2003/.NET 1.1/C# 2.0
    http://del.icio.us/rajoo
    Blow your mind, smoke gunpowder
    Ashes to ashes, dust to dust
    If God won't have you, the devil will. - Author unknown
    Don't follow me, I'm lost too ...

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