diff engine/extensions/pychan/widgets.py @ 81:0e39a20bdfb2

add selection color to widget class
author spq@33b003aa-7bff-0310-803a-e67f0ece8222
date Fri, 18 Jul 2008 12:16:48 +0000
parents 4a0efb7baf70
children 9a1529f9625e
line wrap: on
line diff
--- a/engine/extensions/pychan/widgets.py	Fri Jul 18 10:51:34 2008 +0000
+++ b/engine/extensions/pychan/widgets.py	Fri Jul 18 12:16:48 2008 +0000
@@ -588,6 +588,13 @@
 		self.real_widget.setForegroundColor(color)
 	foreground_color = property(_getForegroundColor,_setForegroundColor)
 	
+	def _getSelectionColor(self): return self.real_widget.getSelectionColor()
+	def _setSelectionColor(self,color):
+		if isinstance(color,type(())):
+			color = fife.Color(*color)
+		self.real_widget.setSelectionColor(color)
+	selection_color = property(_getSelectionColor,_setSelectionColor)
+	
 	def _getName(self): return self._name
 	def _setName(self,name):
 		from pychan import manager