GUI/Maximum window dimensions: Difference between revisions

no edit summary
No edit summary
Line 559:
Sample output for a screen area 1600 x 1200:
<pre>Maximum Window Width: 1600, Maximum Window Height: 1181</pre>
 
=={{header|Python}}==
<lang Python>
#!/usr/bin/env python3
 
import tkinter as tk # import the module.
 
root = tk.Tk() # Create an instance of the class.
root.state('zoomed') # Maximized the window.
root.update_idletasks() # Update the display.
tk.Label(root, text=(str(root.winfo_width())+ " x " +str(root.winfo_height())),
font=("Helvetica", 25)).pack() # add a label and set the size to text.
root.mainloop()
</lang>
Sample output for 1366 x 768 screen:
<pre>1366 x 706</pre>
 
=={{header|Racket}}==