Tk Source Code

View Ticket
Login
Ticket UUID: 326ed7bd6fa378d5bd8018d3232ebc7f2bd65b30
Title: [ttk:PanedWindow]
Type: Bug Version: 8.6
Submitter: anonymous Created on: 2015-02-04 18:00:44
Subsystem: 88. Themed Tk Assigned To: jenglish
Priority: 5 Medium Severity: Cosmetic
Status: Open Last Modified: 2016-08-22 12:22:45
Resolution: None Closed By: nobody
    Closed on:
Description:
Panedwindow doesn't seems repair efficiently the damaged GUI when you move fast the sash. It's possible to check this in this script:



package require Ttk

ttk::frame .f
ttk::panedwindow .f.pane -orient horizontal


ttk::style configure estilo1.TFrame -background red
ttk::style configure estilo2.TFrame -background blue

ttk::frame .f.pane.one -height 800 -width 800 -style estilo1.TFrame
ttk::frame .f.pane.two -height 800 -width 800 -style estilo2.TFrame

.f.pane add .f.pane.one
.f.pane add .f.pane.two

pack .f.pane -expand 1 -fill both
pack .f -expand 1 -fill both
User Comments: anonymous added on 2015-02-10 04:48:09:
This also happens on windows XP and windows 7.

A user on the Tcl Tk chatroom explains better than me this behaviour:

"Do you mean that the line separating the two colors seems to become 
jagged? Or rather stepped.

I see other strange artifacts on the right edge of the window.
The big blocks show up only when moving from right to left."

I am not sure whether this problem is related with the 
pannedwindow, because this also happens with this other script that 
doesn't use the widget (except the strange artifacts on the right edge 
of the window):


proc XPlace {fract} {
     place .left -relwidth $fract
     place .lrhandle -relx $fract
     place .right -relwidth [expr {1.0 - $fract}]
}

wm geometry . [winfo screenwidth .]x[winfo screenheight .]+0+0
frame .left -bg purple
frame .right -bg red
frame .lrhandle -borderwidth 2 -relief raised -bg orange -cursor 
sb_v_double_arrow

. configure -bg black

place .left  -relheight 1 -anchor nw
place .lrhandle -rely .9 -anchor e -width 10 -height 10
place .right -relheight 1 -relx 1 -anchor ne


bind .lrhandle <Configure> {set W [winfo width .]; set X0 [winfo rootx .]}
bind .lrhandle <B1-Motion> {XPlace [expr {(%X-$X0)/double($W)}]}

XPlace .5

pack [ label .left.label -text "Left side" ]
pack [ label .right.label -text "Right side" ]

jenglish added on 2015-02-09 18:59:22:
I've seen this behavior under X11 with both the core panedwindow and ttk::panedwindow: moving the sash triggers two redraws, the first by the X server in response to the child window moving and the second by Tk when it processes the ConfigureNotify event.

I tried different settings for the bit_gravity and win_gravity X11 window attributes, but results were inconclusive and in some cases caused other problems so I abandoned that approach.  

Similar "jiggling" effects might occur under Windows and OSX, don't know about that.