Hi folks,
could someone please have a look at the following bits.
This should correct the alignment problems of text boxes.
Kind Regards,
Valentin Sawadski
Index: TextControl.cs
===================================================================
--- TextControl.cs (revision 66707)
+++ TextControl.cs (working copy)
@@ -41,8 +41,6 @@
// FormatText methods are 1-based (as are all tags, LineTag.Start is 1 for
// the first character on a line; the reason is that 0 is the position
// *before* the first character on a line
-
-
#undef Debug
using System;
@@ -3814,7 +3812,7 @@
if (line.alignment == HorizontalAlignment.Center) {
line.align_shift = (viewport_width - (int)line.widths[line.text.Length]) / 2;
} else {
- line.align_shift = viewport_width - (int)line.widths[line.text.Length] - 1;
+ line.align_shift = viewport_width - (int)line.widths[line.text.Length];
}
}
Index: TextBoxBase.cs
===================================================================
--- TextBoxBase.cs (revision 66707)
+++ TextBoxBase.cs (working copy)
@@ -1528,10 +1528,11 @@
//hscroll.Maximum += vscroll.Width;
canvas_width = ClientSize.Width - vscroll.Width;
} else {
- canvas_width = ClientSize.Width;
+ // Decreasing the canvas_width by 3 to ensure there is a little
+ // space between the text and the border.
+ canvas_width = ClientSize.Width - 3;
}
-
document.ViewPortWidth = canvas_width;
document.ViewPortHeight = canvas_height;
@@ -1587,6 +1588,7 @@
// No scrollbars for a single line
if (!multiline) {
+ PositionControls();
return;
}
_______________________________________________
Mono-winforms-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-winforms-list