Tk Source Code

View Ticket
Login
2017-04-07
20:03 Closed ticket [7ffb9e554c]: Cannot expand tabs plus 5 other changes artifact: be9489cedb user: fvogel
20:01
Fix [3089640fff], [6020ee2d03], [e016579efb], [6bf197edbf] and [7ffb9e554c]: ttk::notebook tabs can disappear (tab width incorrectly calculated), and -tabminwidth option of a style incorrect behaviour. check-in: 9e55bf0b56 user: fvogel tags: trunk
20:01
Fix [3089640fff], [6020ee2d03], [e016579efb], [6bf197edbf] and [7ffb9e554c]: ttk::notebook tabs can disappear (tab width incorrectly calculated), and -tabminwidth option of a style incorrect behaviour. check-in: 2b66146fc6 user: fvogel tags: core-8-6-branch
2017-04-02
21:10 Ticket [3089640fff] Improve squeezing of notebook tabs status still Open with 3 other changes artifact: f8d74d4bce user: fvogel
21:10 Ticket [7ffb9e554c] Cannot expand tabs status still Open with 4 other changes artifact: d4235d04ff user: fvogel
2017-04-01
08:03 Ticket [7ffb9e554c]: 3 changes artifact: 8599e8f746 user: fvogel
2015-05-25
04:23 Ticket [7ffb9e554c]: 3 changes artifact: dc73a07958 user: anonymous
2014-01-04
16:43 Ticket [7ffb9e554c]: 4 changes artifact: 5ba0740a53 user: dkf
16:42 New ticket [7ffb9e554c]. artifact: 5ab4cb9417 user: dkf

Ticket UUID: 7ffb9e554cc4c84c9866eeb0136467fe560ca4ab
Title: Cannot expand tabs
Type: Bug Version: 8.6.1
Submitter: dkf Created on: 2014-01-04 16:42:38
Subsystem: 88. Themed Tk Assigned To: fvogel
Priority: 7 High Severity: Minor
Status: Closed Last Modified: 2017-04-07 20:03:15
Resolution: Fixed Closed By: fvogel
    Closed on: 2017-04-07 20:03:15
Description:

When you configure the -tabminwidth option of a style, you get a very wrong behaviour of tab layout, with the first tab expanding into the space occupied by the other tabs (which shrink), rather than the other tabs also increasing in size. This cannot possibly be right!

Context link (including images of what is desired and what has been tried to achieve it).

User Comments: fvogel added on 2017-04-07 20:03:15:
Merged to core-8-6-branch and trunk.

fvogel added on 2017-04-02 21:10:35:

I have proposed a solution in branch bug-308940fff.

Please try and provide feedback.

Possible test script:

package require Tk
ttk::notebook .n -width 640 -height 400
foreach w { aaaaa bbbbb { This is a very long label for a tab} ccccc ddddd } {
  .n add [frame .n.$w] -text "$w" -sticky news
}
pack .n -fill both -expand 1

ttk::style configure TNotebook -mintabwidth 120

No tabs ever disappear anymore (thanks to the patch from Koen Danckaert in [3089640]), and -mintabwidth style option is now correctly honored when it's possible. That is: priority is given to display of all tabs rather than absolutely honoring -mintabwidth (which would make tabs disappear if the containing window is not large enough).


anonymous added on 2015-05-25 04:23:38:

A previous ticket looking at the same (?) issue: [3089640fff].