Regards,
Nicolas
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/ede37202-183b-fe55-7bf7-1ea5cdaae498%40famillepinault.fr.
For more options, visit https://groups.google.com/d/optout.
2016-05-09 22:53 GMT+02:00 Nicolas Pinault <d...@famillepinault.fr>:
Hi,
Here is what I am trying :
self.win = html.DIV(style={...})
...
self.win.style["backgroundColor"] = colour
I get the following error :
Traceback (most recent call last):
module wx.window line 37
self.win.style["backgroundColor"] = colour
AttributeError: 'CSSProperty' object has no attribute '__setitem__'
Does this mean I can't modify style attribute ?
The CSSProperty is a class (not a dict type). You have __setattr__ available, but not __setitem__, so you can do:
self.win.style.backgroundColor = colour
--
Regards,
Nicolas
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/ede37202-183b-fe55-7bf7-1ea5cdaae498%40famillepinault.fr.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/CAB-sx61snUeG6SrbvFqYME_O0Y7Az2AsH9brEAgvwRYVcZdsmQ%40mail.gmail.com.