views:

40

answers:

2

I'm using in my winform project a RichTextBox control to display a kind of old console screen. This works perfectly but there is a space between the lines. Is it possible to change this space to be 0 or anything near that. If i paint a line from vetical line from line 1 to line 5 i don't want any spacing between the line.

Hope you can help me.

A: 

Check this http://stackoverflow.com/questions/325075/how-do-i-change-richtextbox-paragraph-spacing

Space Cracker
That's WPF though...
Josh Einstein
A: 

There's actually a lot that the Windows Forms RichTextBox doesn't expose. If you have the HWND (Handle property) to the control, you can use the SendMessage API to send the EM_SETPARAFORMAT message to play with the formatting.

In particular the PARAFORMAT2 structure does have some line spacing options that may be relevant. You will have to get your hands dirty with interop though.

Josh Einstein