class: ComboListView
authorClaus Gittinger <cg@exept.de>
Fri, 17 Oct 2014 17:05:57 +0200
changeset 4662 b2497ad9e285
parent 4661 f4b3a9ed36a7
child 4663 b63155a28428
class: ComboListView changed: #enableStateChanged change the foreground color of the field to indicate disabled state.
ComboListView.st
--- a/ComboListView.st	Thu Sep 25 21:43:38 2014 +0200
+++ b/ComboListView.st	Fri Oct 17 17:05:57 2014 +0200
@@ -544,15 +544,18 @@
 !
 
 enableStateChanged
-    |fieldBG|
+    |fieldBG fieldFG|
 
     super enableStateChanged.
     self enabled ifTrue:[
         fieldBG := (styleSheet colorAt:#'comboList.backgroundColor' default:Color white).
+        fieldFG := Button defaultForegroundColor
     ] ifFalse:[
         fieldBG := View defaultViewBackgroundColor.
+        fieldFG := Button defaultDisabledForegroundColor.
     ].
     field backgroundColor:fieldBG.
+    field foregroundColor:fieldFG.
 !
 
 handlesButtonPress:button inView:aView
@@ -790,6 +793,6 @@
 !ComboListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ComboListView.st,v 1.53 2014-07-03 11:45:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ComboListView.st,v 1.54 2014-10-17 15:05:57 cg Exp $'
 ! !