[Tutor] Tkinter and after() method
Cameron Simpson
cs at cskk.id.au
Tue Jan 31 21:35:48 EST 2023
On 01Feb2023 11:51, Phil <phillor9 at gmail.com> wrote:
>I see, doesn't that limit the class to only work with Tkinter, and is
>that normal practise? I try to make my classes universal so that they
>can be used with Tkinter and Wxpython. At the moment I'll be happy if
>the Dial class only works with Tkinter.
Surely. But I'd probably address that with a Dial class for the dial
state, and separate DialWidgets of Tk and/or Wxpython flavours, each of
which has a reference to the Dial. Then the app setup makes a Dial (or
is given Dials, whatever) and makes widgets to show each dial.
That also lets you show the _same_ dial state in multiple places, or
with different widgets (a dial or a bar or ...) all sharing state.
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Tutor
mailing list