test_Dial.py 612 B

12345678910111213141516171819
  1. import pytest
  2. tk = pytest.importorskip('tkinter')
  3. pytest.importorskip('Pmw')
  4. from direct.tkwidgets.Dial import Dial
  5. def test_Dial(tk_toplevel):
  6. tl = tk_toplevel
  7. d = Dial(tl)
  8. d2 = Dial(tl, dial_numSegments = 12, max = 360,
  9. dial_fRollover = 0, value = 180)
  10. d3 = Dial(tl, dial_numSegments = 12, max = 90, min = -90,
  11. dial_fRollover = 0)
  12. d4 = Dial(tl, dial_numSegments = 16, max = 256,
  13. dial_fRollover = 0)
  14. d.pack(expand = 1, fill = tk.X)
  15. d2.pack(expand = 1, fill = tk.X)
  16. d3.pack(expand = 1, fill = tk.X)
  17. d4.pack(expand = 1, fill = tk.X)