Tk Source Code

View Ticket
Login
Ticket UUID: 3592454
Title: sash for hidden pane still draggable with weird effects
Type: Bug Version: obsolete: 8.5.13
Submitter: avl42 Created on: 2012-12-04 15:25:51
Subsystem: 21. [panedwindow] Assigned To: fvogel
Priority: 6 Severity: Minor
Status: Closed Last Modified: 2015-06-01 18:44:48
Resolution: Fixed Closed By: fvogel
    Closed on: 2015-06-01 18:44:48
Description:
As posted on comp.lang.tcl:

panedwindow .p ; pack .p -expand yes -fill both
foreach num {1 2 3} { button .$num -text $num }
.p add .1 .2 .3 -stretch first
.p paneconf .3 -hide 1

The sash between buttons 2 and 3 is still one pixel wide. gettign the mouse
there will show the resize-cursor.  The effect of clicking & dragging it seems
to depend on the window-manager and on whether the toplevel was manually
resized by the user.  If the latter, then dragging the sash magically dragged
the other sash towards the hidden pane. Otherwise it causes the toplevel to
be resized (but only shrunk, never grown, thus still weird).
User Comments: fvogel added on 2015-06-01 18:44:48:
Merged in core-8-5-branch and trunk.

fvogel added on 2015-05-26 21:16:05:
Fix proposed in branch bug-3592454fff

fvogel added on 2015-05-26 20:27:38:
Even more obvious with:

panedwindow .pw -orient vertical -sashwidth 25 -sashrelief ridge -bg black -borderwidth 40

fvogel added on 2015-05-26 20:25:00:
Indeed, with the last pane of a panedwindow being hidden, the last sash is still drawn and this is incorrect.

This is better apparent with the following script featuring a large -sashwidth and -borderwidth:

  package require Tk
  catch {destroy .pw .f1 .f2}
  panedwindow .pw -orient vertical -sashwidth 25 -sashrelief ridge -bg black -borderwidth 10
  frame .f1 -background red -height 50
  frame .f2 -background blue -height 50
  .pw add .f1 .f2
  pack .pw -fill both
  .pw paneconfigure .f2 -hide 1

The dimensions of the panedwindow are correct, the pane being hidden or not.

But the last sash is drawn *on top of the bottom borderwidth* of the panedwindow.