This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients cheryl.sabella, markroseman, serhiy.storchaka, terry.reedy
Date 2018-06-26.03:29:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529983748.27.0.56676864532.issue33962@psf.upfronthosting.co.za>
In-reply-to
Content
Spinoff from #27755, which has a image of tk and ttk versions of a spinbox on Mac and asks about using ttk.spinbox.

ttk Spinbox was added to tcl/tk in 8.5.9 and to tkinter.ttk in 3.7. I believe there are three cases to consider.
tcl/tk   python  action
>= 8.5.9  >=3.7  from tkinter.tkk import Spinbox
>= 8.5.9   3.6   import Entry and copy class Spinbox(Entry) code
< 8.5.9          from tkinter import Spinbox

Serhiy, is tcl/tk < 8.5.9 something we realistically need to worry about, on Linux?

In Dec 2018 or Jan 2019, when 3.6 switches to security fixes only, the 3.6 code can be deleted.

For the present, only use config options in the common subset:
cursor, takefocus, validate, validatecommond, invalidcommand,
xscrollcommand, command, to, from_, increment, values, wrap, format.
Is this sufficient?

Whenever we make 8.5.9 or later a requirement, the tkinter Spinbox can be dropped and the class and style options used.  Or we can subclass tkinter.Spinbox and accept and somehow deal with class and style options.  (We are not presently using custom styles.)

For the present, the code can go in query.py, presently only 300 lines.  When we only need to cater to 3.7+ and 8.5.9+, the code will be replaced by normal import from ttk.

Comman methods: identify, bbox, delete, icursor, index, insert, get.
ttk has set, while tk sets through a textvariable.  If we subclass tk.spinbox, it could have a set method that uses a private Var.

 Do the universal widget methods listed on http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/universal.html
all apply to ttk widgets?
identify,
History
Date User Action Args
2018-06-26 03:29:08terry.reedysetrecipients: + terry.reedy, markroseman, serhiy.storchaka, cheryl.sabella
2018-06-26 03:29:08terry.reedysetmessageid: <1529983748.27.0.56676864532.issue33962@psf.upfronthosting.co.za>
2018-06-26 03:29:08terry.reedylinkissue33962 messages
2018-06-26 03:29:07terry.reedycreate