2

I've been using pywebview lately to develop desktop applications with Flask. I wanted to use the frameless window feature and create my own title bar but the problem is I have no idea how I would go about making that frameless window draggable.

The documentation says it can be moved around by dragging any point but that is not the case for me.

Any ideas?

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
Zen
  • 23
  • 5

2 Answers2

0

Drag area

pywebview window can be moved by dragging any element with the pywebview-drag-region class name. This is useful, for example, in frameless mode when you would like to implement a custom caption bar. The magic class name can be overriden by re-assigning the webview.DRAG_REGION_SELECTOR constant.

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
  • 1
    This answer is a direct copy from https://pywebview.flowrl.com/guide/api.html#drag-area. Next time, please properly quote the text and provide a link/attribution for the source (as I have done here). See [How to reference material written by others](https://stackoverflow.com/help/referencing) – Gino Mempin Oct 24 '21 at 12:57
-1

Use the class pywebview-drag-region in the element you want the window to get dragged from.

enter image description here

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135