Tk Source Code

View Ticket
Login
Ticket UUID: 3301481
Title: ttk::spinbox on windows doesnt handle -width 0
Type: Bug Version: obsolete: 8.5.9
Submitter: dunkfan Created on: 2011-05-13 09:09:35
Subsystem: 88. Themed Tk Assigned To: jenglish
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2023-01-28 09:48:27
Resolution: None Closed By: nobody
    Closed on:
Description:
Setting -width to 0 on a ttk::spinbox (Windows version) sets its entry field to only show 1 character, instead of allowing as many characters as possible in the available space (as in the ttk::entry/spinbox case). Linux handles this correctly.
User Comments: fvogel added on 2023-01-28 09:48:27:

While I see a difference between Linux and Windows (I'm attaching screenshots) I have to admit Idon't see what the problem really is. Was this perhaps fixed since the original report (11 years ago!)?

Here is the script I have used to make the screenshots:

package require Tk
ttk::entry .e -width 0
ttk::spinbox .s -width 0
.e insert 0 a
.s insert 0 a
pack .e .s


dunkfan added on 2011-05-18 14:50:32:
To illustrate where this is a problem, I'm putting a spinbox inside a cell of a treectrl table. The columns may be resized. Narrow colums clip the spinbox buttons off when the width is at its default (20). Make the width too small and risk masking out too much. As a workaround, I use wcb/bind to change the width as required to match the content width.

Attachments: