WindowController#
#
New in version 1.0.0.
Modules and classes that implement useful methods for getting information about the state of the current application window.
Controlling the resizing direction of the application window#
# When resizing the application window, the direction of change will be
# printed - 'left' or 'right'.
from kivymd.app import MDApp
from kivymd.uix.controllers import WindowController
from kivymd.uix.screen import MDScreen
class MyScreen(MDScreen, WindowController):
def on_width(self, *args):
print(self.get_window_width_resizing_direction())
class Test(MDApp):
def build(self):
return MyScreen()
Test().run()
API - kivymd.uix.controllers.windowcontroller
#
- class kivymd.uix.controllers.windowcontroller.WindowController#