| Deutsch English Français Italiano |
|
<1028sfg$14hqg$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Mark Summerfield <m.n.summerfield@gmail.com>
Newsgroups: comp.lang.tcl
Subject: Tcl/Tk 9.0.1 possible ttk::spinbox bug
Date: Tue, 10 Jun 2025 09:04:48 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <1028sfg$14hqg$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 10 Jun 2025 11:04:48 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="ae7f54356c032c08a42763f31cdffd25";
logging-data="1197904"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Z6vIGt8p73YRLPv0ieZ5e"
User-Agent: Pan/0.154 (Izium; 517acf4)
Cancel-Lock: sha1:WeK80dcy6w2XBYzoseTtMoNZMMw=
According to:
https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_spinbox.html#M18
pathName set value
Set the spinbox string to value.
If a -format option has been configured then this format will be
applied.
So when I run the program below I expect it to show "1.23" in the spinbox
but in fact the entire number is shown.
```
#!/usr/bin/env wish9
proc main {} {
tk scaling 1.67
wm title . "Spinbox Test"
wm minsize . 240 120
wm attributes . -type dialog
ttk::spinbox .spinbox -from 1.0 -to 10.0 -format %5.2f -increment 0.1
ttk::button .quitButton -text Quit -underline 0 -command exit
bind . <Escape> { exit }
bind . <Alt-q> { exit }
pack .spinbox -side top
pack .quitButton -side top
.spinbox set 1.23456789
}
main
```