diff options
author | emkael <emkael@tlen.pl> | 2019-07-07 20:45:05 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-07-07 20:45:05 +0200 |
commit | 4f55701e1b291a9a6da9eb7aef5802e6bc20cbf0 (patch) | |
tree | 8468abc56148f0abd27ac3e2bc40961ddd8d4c11 /jfr_playoff/gui/tabs.py | |
parent | e563236fb07628dfec57f7cd887b63f4d87e2067 (diff) |
Numeric values and spinboxes handled in custom widget
Diffstat (limited to 'jfr_playoff/gui/tabs.py')
-rw-r--r-- | jfr_playoff/gui/tabs.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/jfr_playoff/gui/tabs.py b/jfr_playoff/gui/tabs.py index 1656fc7..a12a993 100644 --- a/jfr_playoff/gui/tabs.py +++ b/jfr_playoff/gui/tabs.py @@ -7,12 +7,13 @@ from tkinter import ttk import tkFileDialog as tkfd import tkMessageBox as tkmb -from .frames import TraceableText +from .frames import TraceableText, NumericSpinbox from .frames.match import * from .frames.network import * from .frames.team import * from .frames.translations import * from .frames.visual import * +from .variables import NotifyStringVar, NotifyIntVar, NotifyNumericVar from ..data import PlayoffData from ..db import PlayoffDB @@ -46,12 +47,12 @@ class MainSettingsTab(PlayoffTab): return 'Główne ustawienia' def initData(self): - self.outputPath = tk.StringVar() - self.pageTitle = tk.StringVar() - self.pageLogoh = tk.StringVar() - self.refresh = tk.IntVar() + self.outputPath = NotifyStringVar() + self.pageTitle = NotifyStringVar() + self.pageLogoh = NotifyStringVar() + self.refresh = NotifyIntVar() self.refresh.trace('w', self._updateRefreshFields) - self.refreshInterval = tk.StringVar() + self.refreshInterval = NotifyNumericVar() def _chooseOutputPath(self): currentPath = self.outputPath.get() @@ -135,7 +136,7 @@ class MainSettingsTab(PlayoffTab): command=self._updateRefreshFields, variable=self.refresh)).grid( row=0, column=0) (ttk.Label(refreshPanel, text='co:')).grid(row=0, column=1) - self.intervalField = tk.Spinbox( + self.intervalField = NumericSpinbox( refreshPanel, from_=30, to=3600, width=5, justify=tk.RIGHT, textvariable=self.refreshInterval) self.intervalField.grid(row=0, column=2) |