in reply to Undesired space between Tk Canvases

Press <Tab> in that Tk window. See? You want
$canvas->configure(-highlightthickness =>0);

:-)

update: I see you found out while I was writing the answer... highlightthickness is the width of the highlight border (default 1 pixel). If you set it to 0, the element will not highlight while cycling through the elements with <Tab>, since there is nothing to colour. If you want to leave the border there, use

$canvas->configure(-highlightbackground => $background);

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^2: Undesired space between Tk Canvases
by liverpole (Monsignor) on Apr 25, 2007 at 13:46 UTC
    ++shmem, and thanks,

    Your example illustrates the meaning of highlightthickness quite nicely.  Typing <Tab> several times makes it very clear why you might want to have a space there (I don't of course, because I'm only using the border Canvases to frame the inner one, and thus don't need to select them).

    Similarly, just as I had never used highlightthickness before, highlightbackground was also new to me.  So that's 2 new things you've taught me in Tk -- thank you!


    s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/