python - calling tkinter's canvas with a position -


when call tkinter's canvas, define height , width:

w = canvas(master, width=screenwidth, height=screenheight) 

to this, first user's screen resolution, use height , width. however, on windows systems, overlaps task bar. try remedy shortening height. unfortunately, canvas defined the bottom, cleaves top of canvas down, rather bottom up. ideally, cleave whole taskbar-sized chunk around whole canvas account users place task bar elsewhere.

is there way call canvas position can offset task bar in windows os (or solution general problem of taskbar overlap)?

note: have tried:

w.pack(side="top") 

and following similar question didn't seem situation

positioning canvas in window - tkinter/python

there no way place canvas relative position on screen, per se. canvas not independent window. can place somewhere relative it's containing window.

however, have absolute control on topmost window (either instance of toplevel, or instance of tk) using geometry method. method allows specify width , height of window, , location of window on screen.

so, if you're trying put canvas @ specific location, must put window @ location, make sure canvas fills window.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -