Tk Source Code

Ticket Change Details
Login
Overview

Artifact ID: de5b08711fffda73ed31bdeeebf8705243f0e63e
Ticket: cda289a8ea8d5ac64d245cd67266cd619638bc89
Revised [text]: text disappears when widget is out of focus
User & Date: gcramer 2017-05-24 12:34:34
Changes

  1. icomment:
    <p>
    Before I do a fix an unclear behaviour has to be clarified. See the following script:
    
    <verbatim>
    pack [text .t]
    .t insert end "Line 1"
    .t tag configure stdout -background yellow
    #.t tag raise sel
    .t tag add stdout 1.0 end
    .t tag add sel 1.1 1.3
    focus .t
    </verbatim>
    
    <p>
    This shows a line with yellow background, the selection background is ignored, but the selected text is displayed with the selection foreground.
    
    <ol>
    <li>I would expect that the selection foreground will be ignored if the selection background is ignored, although this behaviour would be an exceptional case, because normally the tag priority is decisive.
    <li>The current behaviour for the selection background is okay, because if the user wants that the selection background has higher priority then he can raise the sel tag. Otherwise, if I read the chapter "THE SELECTION", then it sounds as if the sel tag attributes have highest priority anyway. But this would restrict the formatting capability. Probably the section "THE SELECTION" has to be changed a bit, to make it clear that the priority of the tags is decisive.
    </ol>
    
    <p>
    What do you think?
    
  2. login: "gcramer"
  3. mimetype: "text/html"