Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93561
| From | Cousin Stanley <cousinstanley@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: pygtk2 and colors |
| Followup-To | comp.lang.python |
| Date | 2015-07-07 09:54 -0700 |
| Organization | Hohum Acres |
| Message-ID | <mnh04p$k28$1@dont-email.me> (permalink) |
| References | <3b7fcd33-8ba6-44f7-abf8-ad55458eb96a@googlegroups.com> |
Followups directed to: comp.lang.python
> With python 2.7.5, pygtk 2.24, gtk 2.24:
> The following snippet successfully sets the line_width
> but not the foreground color, and I can't figure-out why.
>
> The color human-name and the result returned
> by gtk.gdk.color_parse are correct. Clues? Thanks.
>
> self.gc.set_line_attributes(myclass.board_line_width, gtk.gdk.LINE_SOLID,
>
> gtk.gdk.CAP_ROUND, gtk.gdk.JOIN_BEVEL)
>
> fg = gtk.gdk.color_parse(myclass.board_foreground)
>
> self.gc.set_foreground(fg)
>
You might try ....
self.set_rgb_fg_color( fg )
Example from ...
http://www.linuxplanet.com/linuxplanet/tutorials/6750/2/
--
Stanley C. Kitching
Human Being
Phoenix, Arizona
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
pygtk2 and colors nickgeovanis@gmail.com - 2015-07-07 06:57 -0700
Re: pygtk2 and colors bkimstunnaboss@gmail.com - 2015-07-07 07:47 -0700
Re: pygtk2 and colors Chris Angelico <rosuav@gmail.com> - 2015-07-08 00:54 +1000
Re: pygtk2 and colors Cousin Stanley <cousinstanley@gmail.com> - 2015-07-07 09:54 -0700
Re: pygtk2 and colors nickgeovanis@gmail.com - 2015-07-07 10:25 -0700
Re: pygtk2 and colors Chris Angelico <rosuav@gmail.com> - 2015-07-08 03:57 +1000
Re: pygtk2 and colors nickgeovanis@gmail.com - 2015-07-07 12:37 -0700
Re: pygtk2 and colors nickgeovanis@gmail.com - 2015-07-10 16:06 -0700
csiph-web