Very simple text problem
I almost feel dumb for asking this - I dont know why I can't get it right.
I have several rows of text that go into a rich text box and for some reason I cannot get them to line up right using
value1.padRight(30) + value2.padleft(10) + value3.padleft(10)
Nir BarPosted Sep 24, 2009, 3:18 PM
Selection is quite intuitive - it's like selecting some text using the mouse.
In your case you'll be doing it programmicaly:
RichTextBox.Select( int start, int length)
The start is the index of the first letter you want to select (index within the RichTextBox.Text)
length is the number of letters (or characters) you're selecting
After you call Select, you set the above properties to the value you want
Please mark this post as an answer if it helps you
Nir
patrickPosted Sep 24, 2009, 3:23 PM
patrickPosted Sep 24, 2009, 3:11 PM
Nir BarPosted Sep 24, 2009, 3:10 PM
patrickPosted Sep 24, 2009, 3:07 PM
Nir BarPosted Sep 24, 2009, 3:00 PM
I was referring to the first
Nir
patrickPosted Sep 24, 2009, 2:54 PM
Nir BarPosted Sep 24, 2009, 2:45 PM
I think you should use these properties: SelectionIndent and SelectionHangingIndent
If you select the three rows you want, then setting SelectionIndent will set the distance from the beginning of the line for the first row.
If you set the hanging-indent, you change the distance of the second and third rows relative to the first row
Please mark this post as an answer if it helps you
Nir