M
Matt Rudder
Hello all,
I'm currently writing a program in which I need a textbox control, similar
to the code editor in .NET. but with line numbers and such. I can't find
anything third-party that even comes close to what I want to do, so I
figured I'd have to write one myself.
I started first by inheriting from a RichTextBox, but I want to be able to
scroll line by line in the control instead of pixel by pixel, and I couldn't
figure out a way to make that happen. Also, I had a hard time making the
line numbers, line up with their line of text.
Then, I tryed started from scratch, and I pretty much got it working, but
scrolling is incredibly slow, as I'm using GDI+ to draw the text, and all
the lines needed.
Am I going about this all wrong? It seems like there should be a better way
to do it, but I'm not sure. If anyone here could point me in the right
direction, that would be great.
Thanks,
Matt Rudder
I'm currently writing a program in which I need a textbox control, similar
to the code editor in .NET. but with line numbers and such. I can't find
anything third-party that even comes close to what I want to do, so I
figured I'd have to write one myself.
I started first by inheriting from a RichTextBox, but I want to be able to
scroll line by line in the control instead of pixel by pixel, and I couldn't
figure out a way to make that happen. Also, I had a hard time making the
line numbers, line up with their line of text.
Then, I tryed started from scratch, and I pretty much got it working, but
scrolling is incredibly slow, as I'm using GDI+ to draw the text, and all
the lines needed.
Am I going about this all wrong? It seems like there should be a better way
to do it, but I'm not sure. If anyone here could point me in the right
direction, that would be great.
Thanks,
Matt Rudder