Click here to Skip to main content
15,905,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a long sentence in richtextbox in vb.net. its word wrap property is true.
i can see six lines (I have not pressed enter key while putting data to richtextbox)
i want to know the width of each line if word wrap is true.

What I have tried:

typed
Label1.Text = RichTextBox1.TextLength
but it shows total length of the whole data in richtextbox
Posted
Updated 2-May-20 22:16pm
Comments
Richard MacCutchan 3-May-20 4:39am    
What you are looking for is the width of the client area of the TextBox. When the number of characters exceeds that width (and that varies according to the font in use), it triggers wordwrap.
CodeMine 13-May-20 21:28pm    
how to do?
Richard MacCutchan 14-May-20 4:27am    
Study the documentation.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900