Working with 2 displays - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: Working with 2 displays (/thread-16841.html) |
Working with 2 displays - jims - Mar-17-2019 Hello All, I have a question about how I might be able to work with multiple monitors in python I would like to be able to have a simple GUI with 2 buttons running on say my laptop. One button says circle and the other says square. If the button saying circle is pushed then a circle is drawn on a 2nd LCD montor attached via HDMI if the button saying square is pushed then a square is drawn on a 2nd LCD montor attached via HDMI So essntially I want the GUI on the laptop screen and the 2nd monitor to only show the shape as either of the 2 buttons is clicked. I have built the GUI and have the buttons working but I don't know how to redirect the shape being drawn to the other monitor. Regards Jim RE: Working with 2 displays - Barrowman - Mar-17-2019 I am sure there are those who would be able to help you but not without seeing your current code. So please post it so it can be looked at RE: Working with 2 displays - jims - Mar-17-2019 Thanks for your reply as requested here is a similar program In this case I want the secondary screen to be filled with red, yellow or green depending on the button pushed on the GUI which should only be seen on the main display from tkinter import * def red(): root3['bg']="red" def green(): root3['bg']="green" def yellow(): root3['bg']='yellow' root = Tk() root3 = Toplevel(root) root3.attributes("-fullscreen", True) Button1 = Button(root,text="RED",command=red) Button1.pack() Button2 = Button(root,text="YELLOW",command=yellow) Button2.pack() Button3 = Button(root,text="GREEN",command=green) Button3.pack() root.mainloop() |