Groups
Groups
Sign in
Groups
Groups
pyglet-users
Conversations
About
Send feedback
Help
Label background
87 views
Skip to first unread message
anatoly techtonik
unread,
Sep 11, 2012, 9:57:47 AM
9/11/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pyglet...@googlegroups.com
Hi,
Is it possible somehow to set background colors for text labels?
Nathan
unread,
Sep 11, 2012, 1:42:10 PM
9/11/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pyglet...@googlegroups.com
On Tue, Sep 11, 2012 at 7:57 AM, anatoly techtonik
<
tech...@gmail.com
>
wrote:
Hi,
Is it possible somehow to set background colors for text labels?
You should probably investigate "background_group" on the Label API page:
http://pyglet.org/doc/api/pyglet.text.Label-class.html
Haven't used it myself, but it sure looks like what you're looking for.
~ Nathan
anatoly techtonik
unread,
Oct 2, 2012, 9:39:32 AM
10/2/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pyglet...@googlegroups.com
"background_group" is still a mystery to me. I've found a way to set style:
label.set_style('background_color', palette.background)
Nathan
unread,
Oct 2, 2012, 10:29:49 AM
10/2/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pyglet...@googlegroups.com
That looks like a nicer way to do it. Was that documented somewhere, or did you find it in the source?
~ Nathan
anatoly techtonik
unread,
Oct 3, 2012, 1:52:03 PM
10/3/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pyglet...@googlegroups.com
Both. Traced ancestry of Label and then found it in
http://www.pyglet.org/doc/programming_guide/formatted_text.html
Of course it will be better to have a dedicate chapter about styling text.
--
anatoly t.
Reply all
Reply to author
Forward
0 new messages