The onColor is only used if the button state (retrieved using the getStateSelector) answers true. Default is false (hence themed gray). Have a go with Color orange as the offColor, for instance. As with Morphic before, the on/off state is orthogonal to mouse over/pressed etc. Note also that buttons in a window will (depending on theme) pick up the window pane color as a base if on/off colours are not specified. Regards, Gary. ----- Original Message ----- From: "Hilaire Fernandes" <hilaire@ofset.org> To: "Pharo Development" <pharo-project@lists.gforge.inria.fr> Sent: Saturday, November 22, 2008 9:14 AM Subject: [Pharo-project] How to set the color of a gradient button ?
On button created with polymorph, like
btn := self newButtonFor: self action: #openFinish label: 'J''ai fini !' help: 'Presse ce bouton lorsque tu as fini l''exercice'. ^ btn onColor: Color green muchLighter offColor: Color gray
Changing the color does not work as expected. There are a couple of metod to change the color but none are working.
Hilaire
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project