[issue33962] IDLE: use ttk.spinbox with configdialog

2021-06-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Mark, I am not sure what last comment meant, but we generally only test IDLE 
with 3.x with the 8.6.y that comes with 3.x.  Ned Deily sometimes runs gui 
tests with various tcl/tk versions and builds to select one for the installer, 
but he knows about whatever you said ;-).

Thank you for the patch.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox with configdialog

2021-06-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 540ebc4a8874f94152980be7778f3f793b65f111 by Miss Islington (bot) 
in branch '3.10':
bpo-33962: Use ttk spinbox for IDLE indent space config (GH-22954)
https://github.com/python/cpython/commit/540ebc4a8874f94152980be7778f3f793b65f111


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox with configdialog

2021-06-10 Thread miss-islington


miss-islington  added the comment:


New changeset 9b889433c7bb3ed7e2b4655f024b49d97fe412fb by Miss Islington (bot) 
in branch '3.9':
bpo-33962: Use ttk spinbox for IDLE indent space config (GH-22954)
https://github.com/python/cpython/commit/9b889433c7bb3ed7e2b4655f024b49d97fe412fb


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox with configdialog

2021-06-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25234
pull_request: https://github.com/python/cpython/pull/26648

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox with configdialog

2021-06-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 42d5a4fc3b35e45cdd237d56a04e98894d0a31f5 by Mark Roseman in 
branch 'main':
bpo-33962: Use ttk spinbox for IDLE indent space config (GH-22954)
https://github.com/python/cpython/commit/42d5a4fc3b35e45cdd237d56a04e98894d0a31f5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox with configdialog

2021-06-10 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +25233
pull_request: https://github.com/python/cpython/pull/26647

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox with configdialog

2020-10-25 Thread Mark Roseman


Mark Roseman  added the comment:

Just as a side note for Terry and anyone else testing on macOS... the recent 
updates in Tk have smoothed out many of the appearance issues for the classic 
widgets. See the attached screen shot tkversions.png comparing 8.6.9 with the 
current trunk of the Tk repo. Notice things like the background color around 
the optionmenu aren't as jarring on the newer Tk versions.

Having said that, I'll likely stick with the older ones for development 
purposes, just because the blemishes with the classic widgets and other things 
are so much more noticeable! 

Incidentally, if you've got several versions of Tcl/Tk on your system, you can 
use /usr/bin/install_name_tool to point the Tkinter shared library at the one 
you want to use. Use like "install_name_tool -change OLD NEW file", e.g.:
install_name_tool -change /Library/Frameworks/Tk.framework/Versions/8.6/Tk 
/Users/roseman/tmp/tcl86core/Library/Frameworks/Tk.framework/Versions/8.6/Tk 
build/lib.macosx-10.15-x86_64-3.10/_tkinter.cpython-310-darwin.so

--
Added file: https://bugs.python.org/file49540/tkversions.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox with configdialog

2020-10-25 Thread Mark Roseman


Mark Roseman  added the comment:

Whoops, sorry... there's a "readonly" state flag that disables direct editing 
of the entry (like with combobox) and just allows manipulation of the arrows. 
I've updated the PR to set that. I've also changed it so that the contents of 
the entry part isn't selected whenever the arrows are used (agreed, it looks 
ugly). Please give it a try and let me know.

p.s. I just checked, the entry's width configuration option works. You just 
have to remove the "fill=X" when the widget is packed. FWIW, I kept the 
previous layout to keep the patch as minimal as possible, under the assumption 
that other layout changes (here, on in general) were planned.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox with configdialog

2020-10-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

#27755 was about replacing uses of our custom DynOptionMenu with ttk.Combobox, 
which I believe we can do now, wherever we don't replace it with something 
else.   One use is for font size choice; Spinbox was suggested as an 
alternative replacement.

Spinbox was also proposed somewhere else to remplace the indent size Label 
scale.  But I/we had decided, somewhere,  to use a simple entry box, like those 
for entering counts on the General tab, with validation limits of 1 and 16, and 
move the choice to the General tab.  (If we don't have validate(min, max) 
function, should make one.)  SO

The transfer cannot be done until the General tab is split into 2, as it is now 
too long (does not fix on Macbook Air -- cannot see buttons).  I think General 
windows preferences (where indent should go) + help resources for 1, Specific 
Editor only or Shell only for other.  Not sure of names.

This all said, I tried out the patch.  The spinbox appears to be an Entry with 
added arrows.  If it worked right, it could be used for some other int entries 
instead of plain Entry.  But in some ways, it seems partly worse than Entry.
0. No doc in Shipman (written before 8.5.9); must use tk doc.
1. Expands to space available; is Entry char width really disabled?
2. Deleting digit to replace it generates 2 TclErrors*.
3. Clicking arrow 'selects' entry.  Patch used text selection, but my dark 
theme select looks awful for single digit.  We can fix this with different 
config.

* ...
  File "f:\dev\3x\lib\tkinter\__init__.py", line 536, in get
return self._tk.getint(value)
_tkinter.TclError: expected integer but got ""
During handling of the above exception, another exception occurred:
...
  File "f:\dev\3x\lib\tkinter\__init__.py", line 538, in get
return int(self._tk.getdouble(value))
_tkinter.TclError: expected floating-point number but got ""

I will look more later.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox with configdialog

2020-10-24 Thread Mark Roseman


Change by Mark Roseman :


--
keywords: +patch
pull_requests: +21872
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/22954

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox with configdialog

2018-12-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions:  -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox with configdialog

2018-09-23 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: IDLE: use ttk.spinbox -> IDLE: use ttk.spinbox with configdialog

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox

2018-06-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

ttk.Spinbox inherits from ttk.Entry.  My option list left out the options for 
Entry, which is one of the ttk widget not in the doc.  The additional entry 
options include exportselection, justify, show, state, textvariable, and width.
https://www.tcl.tk/man/tcl8.6/TkCmd/ttk_spinbox.htm
explicitly says textvariable is supported.  This is important because 
configdialog uses tracers on Var to detect and record user changes.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox

2018-06-26 Thread Mark Roseman


Mark Roseman  added the comment:

For now, using a (likely very minimal) subset of commands/options common to 
both classic and ttk spinbox versions in IDLE sounds good. 

I was originally thinking stick with "-textvariable" for setting (which works 
on both) but I like your idea of adding "set" to a tk.spinbox subclass.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33962] IDLE: use ttk.spinbox

2018-06-25 Thread Terry J. Reedy


New submission from Terry J. Reedy :

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,

--
assignee: terry.reedy
components: IDLE
messages: 320465
nosy: cheryl.sabella, markroseman, serhiy.storchaka, terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: use ttk.spinbox
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com