开发者

Creating a sliding frame containing widgets in tkinter in python

开发者 https://www.devze.com 2022-12-31 08:00 出处:网络
I am trying really hard to make a sliding frame containing widgets in tkinter in py开发者_C百科thon. There is this frame inside a big window with different widgets. And as soon as i click on the next

I am trying really hard to make a sliding frame containing widgets in tkinter in py开发者_C百科thon. 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消