Description: |
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]
|