CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2008
    Location
    India
    Posts
    780

    how can fix number of lines in multiline edit box?

    Hi all,

    i m using a multiline edit box and use enter for new line .

    i want to enter only 10 lines in edit box and each line only have max 320 char.

    here SetLimitText available but its set the total length of edit box.

    please help for this.

    thank in advance.
    IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH

  2. #2
    Join Date
    Nov 2010
    Posts
    12

    Re: how can fix number of lines in multiline edit box?

    Then why not set it to ~ 10x320 ?

  3. #3
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: how can fix number of lines in multiline edit box?

    There is no way to tell an edit control to use 10 lines of 320 characters. You probably have to handle EN_UPDATE notification (or maybe EN_UPDATE) and insert the new line into the text at the desire location. Maybe, defining your own word wrapping procedure could do the trick, but I've never tried that. See this http://msdn.microsoft.com/en-us/libr...=VS.85%29.aspx.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

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