I would like to load a file to the .Rtf property of a RichTextBox, and then
set the containing form (if possible, depending on screen resolution) to the
smallest width that will not cause the horizontal scrollbar to appear.
Now the RichTextBox must know what width will cause the horizontal scrollbar
to disappear because, after all, the scrollbar does disappear if you make it
wide enough (the RichTextBox is docked to the form.) Any idea how my code
can get that information? I have actually tried to calculate it by grabbing
the Graphics object of the RichTextBox and using MeasureString() on the
longest line, but that did not give the right answer, plus it should not be
necessary... the control has to have this information already I would think.
(If it were a ScrollableControl, it would be AutoScrollMinSize.Width, but
it's not...)
-Rachel