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
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
Post a Comment