Tk Library Source Code

Ticket Change Details
Login
Overview

Artifact ID: 2e5f4a893ea5cb3e39499960ae91582f6b21575611ebe3190f920cd6bcf17175 (Awaiting Moderator Approval)
Ticket: 9924aee88145dde4d5147b2e9d87b048201c34b4
tooltip on megawidgets
User & Date: ralfixx 2025-07-30 16:53:38
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    [https://core.tcl-lang.org/tk/tktview/47d4f291598222849fc0121e7ffbdee53766ce77]
    deliberately changed the behaviour of Enter/Leave events of widgets in a
    parent/child relationship: now when entering a child, the parent gets a
    leave event.
    
    This however kills tooltips on the parent, which previously (up to tk
    8.6.12) worked on both, parent *and* child.
    
    This has an impact on megawidgets which have a
    parent-child-relationship: previously (before tcl 8.6.13) a tooltip
    worked on all parts of the megawidget, now (tcl 8.6.13 and later) the
    situation is more complex:
    
    <pre>
    wm geometry . 200x100
    # a "mega-widget" with borders
    pack [frame .f -bg green1] -side top
    pack [frame .f.f1 -bg red -width 20 -height 20] -side left -padx 10 -pady 10
    pack [label .f.lbl -bg white -text label-1] -side right
    
    # a "mega-widget" without borders (no padding)
    pack [frame .f2 -bg green1] -side bottom
    pack [frame .f2.f1 -bg red -width 20] -side left -fill both
    pack [label .f2.lbl -bg white -text label-2] -side right -fill both -expand yes
    
    package require tooltip
    tooltip::tooltip .f "This is .f"
    tooltip::tooltip .f2 "This is .f2"
    </pre>
    
    In the upper "mega-widget", the tooltip comes and goes as the mouse
    enters the various parts (red box, white label).
    
    In the lower "mega-widget", the container itself is not visible, and
    the tooltip works on all parts of the mega-widget.
    
    IMHO the tooltip also needs to work on all parts in the upper
    "mega-widget".
    
    Proposed patch attached (ignore the <Leave> event if the event detail
    is "NotifyInferior").
    
    R'
    
  5. foundin changed to: "2.0.1"
  6. is_private changed to: "0"
  7. login: "ralfixx"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "1d3c95db24e116878d6afed7cf890a89a0effe62"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "ralfixx"
  14. subsystem changed to: "tklib :: tooltip"
  15. title changed to: "tooltip on megawidgets"
  16. type changed to: "Bug"