944,004 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Marked Solved
  • Views: 1537
  • Python RSS
Oct 14th, 2009
0

Tkinter- Get window width and height. Please help

Expand Post »
Hi,

There is a lot of code - so I have attached the entire thing as a zip file.
This is for a function plotter.
Basically, I need to track the changes in the root window size so I can resize the canvas and redraw all the plots.
I'm very new to Tkinter (this is a 1st year uni course for software engineering) and I'm struggling on how to obtain a width/height of the main window. I've set master.geometry("800x600") so I know it starts off at 800 and 600 - but I cant follow these changes.

Please, any help would be greatly appreciated. I think that if I recoded PlotApp and put everything in a frame that fills and expands and then tracked that frame I could do it- but is there an easier way because I think if I had to do it that way there would be a lot of recoding.
Attached Files
File Type: zip assign2.zip (2.5 KB, 45 views)
Last edited by marshall31415; Oct 14th, 2009 at 10:32 am.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
marshall31415 is offline Offline
4 posts
since Oct 2009
Oct 14th, 2009
0
Re: Tkinter- Get window width and height. Please help
I notice you have the binding to the configure event rem'd out. Why?

Wait are you talking about the desktop width and height?

Try this link

http://www-acc.kek.jp/WWW-ACC-exp/KE...ual/winfo.html
Last edited by gerard4143; Oct 14th, 2009 at 10:50 am.
Reputation Points: 499
Solved Threads: 367
Postaholic
gerard4143 is offline Offline
2,197 posts
since Jan 2008
Oct 14th, 2009
0
Re: Tkinter- Get window width and height. Please help
I'm trying to determing the width and height of the window with the title "Function Plotter".

I want to expand the canvas and redraw the plots when the window is resized.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
marshall31415 is offline Offline
4 posts
since Oct 2009
Oct 14th, 2009
1
Re: Tkinter- Get window width and height. Please help
Moderator
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004
Oct 14th, 2009
0
Re: Tkinter- Get window width and height. Please help
Thank you so much. I wasnt using the update() feature- I assumed it was self-updating. Cheers
Reputation Points: 10
Solved Threads: 0
Newbie Poster
marshall31415 is offline Offline
4 posts
since Oct 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: CSV help!
Next Thread in Python Forum Timeline: Save longest Int in a range (homework) (hailstone sequence)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC