Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1312

Python • Re: Using tkinter with two monitors

$
0
0
Use the screen configuration utility to position the two monitors side by side

The two windows are creaated as Tk and Toplevel

tk_window0=Tk()
tk_window1=Toplevel()

Then use tk_window0/1.geometry() to position the two windows,

To Tkinter the two monitors look like one large desktop with the left monitor at 0,0 and the right monitor at monitor_x_resolution,0

This is done from line 325 onward, the code before that basically decodes the output of to xrandr command to get the monitor position and dimensions.

Statistics: Posted by KenT2 — Thu Dec 14, 2023 3:58 pm



Viewing all articles
Browse latest Browse all 1312

Trending Articles