dabo Commit
Revision 6788
Date: 2011-08-19 05:35:55 -0700 (Fri, 19 Aug 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6788
Changed:
U trunk/dabo/ui/uiwx/dRichTextBox.py
Log:
Added ReadOnly property.
Diff:
Modified: trunk/dabo/ui/uiwx/dRichTextBox.py
===================================================================
--- trunk/dabo/ui/uiwx/dRichTextBox.py 2011-08-17 18:49:01 UTC (rev 6787)
+++ trunk/dabo/ui/uiwx/dRichTextBox.py 2011-08-19 12:35:55 UTC (rev 6788)
@@ -150,6 +150,16 @@
self._properties["InsertionPosition"] = val
+ def _getReadOnly(self):
+ return not self.IsEditable()
+
+ def _setReadOnly(self, val):
+ if self._constructed():
+ self.SetEditable(not bool(val))
+ else:
+ self._properties["ReadOnly"] = val
+
+
def _getSelectionBackColor(self):
if not self.HasSelection():
return None
@@ -385,6 +395,9 @@
InsertionPosition = property(_getInsertionPosition,
_setInsertionPosition, None,
_("Current position of the insertion point in the
control. (int)"))
+ ReadOnly = property(_getReadOnly, _setReadOnly, None,
+ _("Specifies whether or not the text can be edited.
(bool)"))
+
SelectionBackColor = property(_getSelectionBackColor,
_setSelectionBackColor, None,
_("Color of the current selection's background. (RGB
3-tuple)"))
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]