diff options
Diffstat (limited to 'src/GraphicObjects/Label.cs')
| -rw-r--r-- | src/GraphicObjects/Label.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/GraphicObjects/Label.cs b/src/GraphicObjects/Label.cs index 64ee9688..214e14ed 100644 --- a/src/GraphicObjects/Label.cs +++ b/src/GraphicObjects/Label.cs @@ -265,6 +265,7 @@ namespace Crow { get { return lines [CurrentLine] [CurrentColumn]; + //return _currentCol > lines[CurrentLine].Length ? (char)0 : lines [CurrentLine] [CurrentColumn]; } } /// <summary> @@ -775,6 +776,19 @@ namespace Crow if (CurrentLine >= lines.Count) CurrentLine = lines.Count - 1; + switch (TextAlignment) { + case Alignment.Center: + case Alignment.Top: + case Alignment.Bottom: + cPos+= ClientRectangle.Width - gr.TextExtents(lines [CurrentLine]).Width/2.0; + break; + case Alignment.Right: + case Alignment.TopRight: + case Alignment.BottomRight: + cPos += ClientRectangle.Width - gr.TextExtents(lines [CurrentLine]).Width; + break; + } + for (int i = 0; i < lines[CurrentLine].Length; i++) { string c = lines [CurrentLine].Substring (i, 1); |