Tk Source Code

View Ticket
Login
Ticket UUID: cb21f579dd887f0246516055016b69a3a5e34e49
Title: Embedded windows leak over border and highlight areas of [text]
Type: Bug Version: core-8-6-branch, revised_text
Submitter: fvogel Created on: 2017-10-28 13:19:02
Subsystem: 18. [text] Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2022-05-21 06:39:32
Resolution: None Closed By: nobody
    Closed on:
Description:

Embedded windows leak over border and highlight areas of [text]

Demo script:

package require Tk
frame .f
scrollbar .x   -orient horizontal -command ".f.t xview"
scrollbar .f.y -orient vertical   -command ".f.t yview"
text .f.t -wrap none -height 10 -width 15 \
        -borderwidth 20 -highlightthickness 25 \
        -xscrollcommand ".x set" -yscrollcommand ".f.y set"
pack .f.t .f.y -side left -fill y
pack conf .f.t -fill both -expand yes
pack .f .x -side top -fill x
button .b -text "The Button"
.f.t insert end [string repeat "A typical long line.\n" 20]
.f.t window create end -window .b
.f.t insert end [string repeat "A typical long line.\n" 20]
.f.t see 19.0
.f.t xview moveto 0.25

This happens with both the legacy text widget and the revised version: see attached snapshots "EmbWin_overBorder-legacy_text.png" and "EmbWin_overBorder-revised_text.png".

In addition, with the revised version only:

- a ghost can be seen in the borderwidth area (see snapshot "EmbWin_overBorder-revised_text.png")

- playing with the scrollbars, one can produce kind of 'vapor trails' (see snapshot "Ghosts_twind.tcl_bigbordersandpads_revised_text.png", this one was produced with the twind.tcl demo (text demo #4 launched by the "widget" demo script), with text wrapping off, big borders and pad, and playing with the Y scrollbar)

This is on Windows, at least.

User Comments: fvogel added on 2022-05-21 06:39:32:

I have fixed ghosts and 'vapor trails' shown by the revised text widget in ticket [94547cbef7]. They were due to the widget border not always redrawn when it should.


fvogel added on 2017-11-05 20:24:20:

See [842504ffff], this was already reported 13 years ago.


Attachments: