views:

36

answers:

1

I am trying really hard to make a sliding frame containing widgets in tkinter in python. There is this frame inside a big window with different widgets. And as soon as i click on the next button on that frame the frame should slowly slide towards the left and vanish ultimately. As soon as it vanishes, i want new frame with widgets to come sliding towards right. What should i do?

Anticipating your suggestions and ideas.

A: 

How you do it depends on the geometry manager, but the basic idea is simply to set the width of the frame to smaller and smaller values until it has a width of zero. You don't need a loop though -- the code is already running in the event loop, so take advantage of that. Use 'after' to schedule a job that changes the width a tiny bit, then reschedules itself for a few milliseconds later.

Bryan Oakley