1,105,636 Community Members

pygame in tkinter

Member Avatar
slasel
Newbie Poster
19 posts since Nov 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hi,

Is it possible to embed something made with pygame, like some sort of animated display or bouncing ball... into a Tkinter made window, with tkinter buttons/frames etc...
If yes, then may you please tell me how can i do that?

Thanks

Member Avatar
epicSHOOTER236
Newbie Poster
16 posts since Nov 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 2 [?]
Skill Endorsements: 0 [?]
 
0
 

if you want to display a bouncing ball or something simple the tkinter library uses .gif images, so you could create a gif of that if you absoulutly need it to be made in Pygame i cant help you there.

Member Avatar
vegaseat
DaniWeb's Hypocrite
6,984 posts since Oct 2004
Reputation Points: 1,544 [?]
Q&As Helped to Solve: 1,872 [?]
Skill Endorsements: 67 [?]
Moderator
 
1
 

You can use certain pygame modules like the pygame mixer with Tkinter to play sounds.
However, IMHO for the application you want to use the pygame and the Tkinter event loops will clash.
You may have to use module threading to make this go.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article