File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -6,14 +6,13 @@ Get available display information using `webview.screens`
6
6
``` python
7
7
import webview
8
8
9
- def display_screen_info ():
9
+
10
+ if __name__ == ' __main__' :
10
11
screens = webview.screens
11
12
print (' Available screens are: ' + str (screens))
12
13
14
+ for i, screen in enumerate (screens):
15
+ webview.create_window(' ' , html = f ' placed on the monitor { i+ 1 } ' , screen = screen)
13
16
14
- if __name__ == ' __main__' :
15
- display_screen_info() # display screen info before starting app
16
-
17
- window = webview.create_window(' Simple browser' , ' https://pywebview.flowrl.com/hello' )
18
- webview.start(display_screen_info)
17
+ webview.start()
19
18
```
Original file line number Diff line number Diff line change 3
3
import webview
4
4
5
5
6
- def display_screen_info ():
7
- screens = webview .screens
8
-
9
-
10
6
11
7
if __name__ == '__main__' :
12
8
screens = webview .screens
13
9
print ('Available screens are: ' + str (screens ))
14
10
15
- window = webview . create_window ( '' , html = 'placed on the first monitor' , screen = screens [ 0 ])
16
- window = webview .create_window ('' , html = 'placed on the second monitor' , screen = screens [ 1 ] )
11
+ for i , screen in enumerate ( screens ):
12
+ webview .create_window ('' , html = f 'placed on the monitor { i + 1 } ' , screen = screen )
17
13
18
14
webview .start ()
19
15
You can’t perform that action at this time.
0 commit comments