Author: pbartok
Date: 2005-12-05 15:45:33 -0500 (Mon, 05 Dec 2005)
New Revision: 53950
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs
Log:
2005-12-05 Peter Dennis Bartok <[EMAIL PROTECTED]>
* RichTextBox.cs: Implemented get_SelectionColor
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2005-12-05 20:44:42 UTC (rev 53949)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2005-12-05 20:45:33 UTC (rev 53950)
@@ -1,3 +1,7 @@
+2005-12-05 Peter Dennis Bartok <[EMAIL PROTECTED]>
+
+ * RichTextBox.cs: Implemented get_SelectionColor
+
2005-12-05 Alexander Olk <[EMAIL PROTECTED]>
* ThemeClearlooks.cs:
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs
2005-12-05 20:44:42 UTC (rev 53949)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs
2005-12-05 20:45:33 UTC (rev 53950)
@@ -396,7 +396,33 @@
[MonoTODO]
public Color SelectionColor {
get {
- throw new NotImplementedException();
+ Color color;
+ LineTag start;
+ LineTag end;
+ LineTag tag;
+
+ start = document.selection_start.tag;
+ end = document.selection_end.tag;
+ color =
((SolidBrush)document.selection_start.tag.color).Color;
+
+ tag = start;
+ while (true) {
+ if
(!color.Equals(((SolidBrush)tag.color).Color)) {
+ return Color.Empty;
+ }
+
+ if (tag == end) {
+ break;
+ }
+
+ tag = document.NextTag(tag);
+
+ if (tag == null) {
+ break;
+ }
+ }
+
+ return color;
}
set {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches