resize a tkinter window to the size of a gif

Scott Hathaway slhath at home.com
Tue Mar 6 10:05:43 EST 2001


I have a tkinter window that I want to resize to the size of a background
image I am placing on it.  The window always seems to have a border of a few
pixels all the way around it.  Can anyone tell me how to get rid of this?
The code I am using is below:

frmMain = Pmw.initialise()
iPath = mainPath + themePath + '\\'
imgBG = PhotoImage(file=iPath + imgSettings[1])
frmMain.width = imgBG.width()
frmMain.height = imgBG.height()
theCanvas = Canvas(frmMain,width=frmMain.width,height=frmMain.height)
theCanvas.pack(expand=0)
theCanvas.create_image(0,0,anchor=NW,image=imgBG)

Any help would be appreciated.

TIA,
Scott





More information about the Python-list mailing list