Pyloid Docs
GithubLanguage
  • 💎What is Pyloid?
  • Getting Started
    • Prerequisites
    • Create Pyloid App
  • Core Concepts
    • Thread Safety
  • API
    • Python (Backend)
      • Pyloid
      • BrowserWindow
      • Monitor
      • TrayEvent
      • Utility Functions
      • RPC
      • Store
    • Javascript (Frontend)
      • Event
      • BaseAPI
      • RPC
  • Guides
    • Load Webview
    • Serve Frontend
    • Calling Python from JS
    • Calling JS from Python
    • Keyboard Shotcuts
    • Notification
    • Tray
    • Timer
    • File Watcher
    • Clipboard
    • Window Position
    • Devtools
    • Window Drag Region
    • Window Radius And Transparent
    • Autostart
    • Production Utils
    • Desktop Monitor
    • File Dialog
    • Splash Screen
Powered by GitBook
On this page
  • 1. Using parameters when creating a window
  • 2. Using the set_position method
  • 3. Using the set_position_by_anchor method

Was this helpful?

Edit on GitHub
  1. Guides

Window Position

1. Using parameters when creating a window

app = Pyloid(app_name="Pyloid-App")

window = app.create_window("Pyloid-Window", x=100, y=100)

2. Using the set_position method

The window position is determined by the x and y parameters.

app = Pyloid(app_name="Pyloid-App")

window = app.create_window("Pyloid-Window")

window.set_position(x=100, y=100)

3. Using the set_position_by_anchor method

The window position is determined by the anchor parameter.

The position is set based on the available screen space (excluding the taskbar).

Available anchor positions:

  • top

  • left

  • right

  • bottom

  • top-left

  • top-right

  • bottom-left

  • bottom-right

  • center

app = Pyloid(app_name="Pyloid-App")

window = app.create_window("Pyloid-Window")

window.set_position_by_anchor("center")
PreviousClipboardNextDevtools

Last updated 6 months ago

Was this helpful?