문제

How can I force ttk to update the screen? I'm running a long loop and would like to display some interim results, but ttk waits until it finishes the loop to update the screen.

I tried inserting sleep and after calls in the loop, but that didn't help.

도움이 되었습니까?

해결책

update_idletasks() appears to be the answer. For example adding

 relevant_widget.update_idletasks()

in the loop works.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top