Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Working with 2 displays
#1
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
Quote
#2
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
Quote
#3
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()
Quote

Top Page

Forum Jump:


Users browsing this thread: 1 Guest(s)