+2007-04-03 Jackson Harper <jackson@ximian.com>
+
+ * TextBoxBase.cs: We need to calculate maximums even if this is
+ not a multiline control, because the maxs are used for scrolling.
+
2007-04-03 Jonathan Pobst <monkey@jpobst.com>
* ToolBar.cs: Fix some breakage caused by the SetBoundsCore change.
internal void CalculateScrollBars () {
// FIXME - need separate calculations for center and right alignment
- if (!document.multiline) {
- PositionControls ();
- return;
- }
+ //
if (document.Width >= document.ViewPortWidth) {
hscroll.SetValues (0, Math.Max (1, document.Width), -1,
document.ViewPortWidth < 0 ? 0 : document.ViewPortWidth);
- hscroll.Enabled = true;
+ if (document.multiline)
+ hscroll.Enabled = true;
} else {
hscroll.Enabled = false;
hscroll.Maximum = document.ViewPortWidth;
if (document.Height >= document.ViewPortHeight) {
vscroll.SetValues (0, Math.Max (1, document.Height), -1,
document.ViewPortHeight < 0 ? 0 : document.ViewPortHeight);
- vscroll.Enabled = true;
+ if (document.multiline)
+ vscroll.Enabled = true;
} else {
vscroll.Enabled = false;
vscroll.Maximum = document.ViewPortHeight;
}
-
if (!WordWrap) {
if ((scrollbars & RichTextBoxScrollBars.Horizontal) != 0) {
if (((scrollbars & RichTextBoxScrollBars.ForcedHorizontal) != 0) || hscroll.Enabled) {