Tk Library Source Code

Ticket Change Details
Login
Overview

Artifact ID: 5a8649cde71bce0595afc1b96581e63991e34f79477ec2227553e3251d80baa6
Ticket: e8bf5556a856e0f56bfd0e12674339f3d09356ab
Get id from ::Plotchart::DrawTimePeriod
User & Date: rianby64 2017-11-16 12:03:14
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    Hello!
    
    I'd like to bind some events to the TimePeriod rectangle. I see the description of the function that draws this time period, and see that it returns none.
    
    # DrawTimePeriod --
    #    Draw a period
    # Arguments:
    #    w           Name of the canvas
    #    text        Text to identify the "period" item
    #    time_begin  Start time
    #    time_end    Stop time
    #    colour      The colour to use (optional)
    # Result:
    #    None
    # Side effects:
    #    Data bars drawn in canvas
    #
    
    And I need to perform things like...
    set s [::Plotchart::createTimechart .c "1 january 2004"  "31 december 2004" 4]
    set spring [$s period "Spring" "1 march 2004" "1 june 2004" green]
    .c bind $spring <ButtonPress> [list handleClick %W %x %y]
    
    By the way, the GanttChart allows me to bind events to the tasks...
    set s [::Plotchart::createGanttchart .c "1 january 2004" \
            "1 march 2005" 2]
    
    set spring [$s task "" "1 march 2004" "1 june 2004" 0]
    .c bind [lindex $spring 2] <ButtonPress> [list handleClick %W %x %y]
    
  5. foundin changed to: "1.3"
  6. is_private changed to: "0"
  7. login: "rianby64"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "555de8b3670dee698222f331e9a63ff54424503e"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "rianby64"
  14. subsystem changed to: "tklib :: plotchart"
  15. title changed to: "Get id from ::Plotchart::DrawTimePeriod"
  16. type changed to: "Bug"