![]() ![]() probe() to force to check for changes without returning anything.""" commit() at the end of your program, then it will never trigger until then.Ĭall. ![]() t() not for changes to the underlying value in either location. Self._load = lambda :inidb(inifile).get(varname, getter()) ![]() Self._save = lambda value :inidb(inifile)._setitem_(varname, getter()) ![]() Then the ini value is read if available, if not the default value is used.""" """Remember that getter is called first to provide the default value. """A connector class between a value stored in an ini file, and a value stored elsewhere that can be get and set with two helper functions."""ĭef _init_(self, getter, setter, varname, inigroup="Settings", inifile=''): Thanks to the information I found here, This is what we're doing now: class INI_Link: I recently ran into a similar issue where a library I was supporting needed to add Windows 10 as a development target also. It provides a native link to window manager's behavior, thus working much better, than playing with overrideredirect and setting geometry by hand (which on some platforms could lead to unmanaged window, which could be closed only by its own interface or killing the process, won't show on the taskbar, etc.) On some machines in could zoom only by width or by height, but comparing to previous method, this one would never give you a window partly ouside of the screen.įinally, if you want a fullscreen, not just zoomed window, use root.wm_attributes('-fullscreen', 1). It is universally available and seems to be the safest. So, you also couldn't rely on it.Īnd the third, in my opinion the best approach is to use root.wm_attributes('-zoomed', 1). For example, under my Arch the maxsize() returns (1425, 870), while the real geometry of maximized window should be (1440, 848). This works on most machines, but not on all. The second is to first get the maxsize, and then set geometry manually, like: m = root.maxsize() However, under my Arch machine it doesn't. It works on Windows, and on my Ubuntu machine. The first approach is to use the root.state('zoomed'), but is not supposed to be universally available. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |