perl - Unable to Remove Border from Tk Window -
i using perl , tk display window images inside. cycles through images in pattern of white background, black background, image (1280x800), repeat. problem need able view entire image. tk putting on 2-pixel border on top of images, including black , white backgrounds. here code...
use tk; # create , configure canvas: $canvas = $mw->canvas( -cursor=>"crosshair", -background=>"black", -width=>1280, -height=>800 )->pack(); $canvaswidth = 1280; $canvasheight = 800; $blackrect = $canvas->createrectangle(0,0,$canvaswidth,$canvasheight, -fill => "black", -tags => ['blackrect']); $whiterect = $canvas->createrectangle(0,0,$canvaswidth,$canvasheight, -fill => "white", -tags => ['whiterect']); # create photo object , 1 button reuse it. $shot = $canvas->photo(); $image = $canvas->createimage(0,0, -image => $shot, -anchor => "nw", -tags => ['image']); # remove borders $mw->overrideredirect(1); # loop through images
i know overrideredirect
gets rid of of stuff, still doesn't give me naked window. have tried adding -borderwidth=>0
canvas creation, , changes nothing.
the border appears , never goes away, not when first image displayed.
can border removed? if so, how?
add
-highlightthickness => 0
to canvas
call. remove border used show focussed widget.
Comments
Post a Comment