Advanced Search
Mail us
Home    Manuel    Links    Faq    Submit a tcl/tk Reference    Contact Us

    Some examples tcl/tk codes     Man of Bwidget     Man of blt     mkwidget screenshots     TkOgl     Video Demo real.

  Why doesn`t the `canvas` seem to start at 0,0?
 The canvas coords are skewed by the highlight border and the relief.  By
default, they overlap onto the canvas coord space.  There are two ways
to deal with this:

## Method 1, zero out the highlightthickness and borderwidth
## (borderwidth defaults to zero) anyway
.canvas configure -borderwidth 0 -highlightthickness 0

## Method 2, adjust the canvas position to expose 0,0 properly
.canvas xview moveto 0
.canvas yview moveto 0

Method 2 is better, but you must do it anytime you adjust the canvas
borderwidth or highlightthickness.