Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GUI built with Tk renders at different sizes for no discernible reason

Status
Not open for further replies.

Bloogson

Programmer
Jan 20, 2015
1
US
Here is my source code:
Without changing any of my code, I can run RPG.rb, then close the program, run it again, and the GUI will render at two different sizes. This goes contrary to everything I understand about programming, so I'm pretty baffled. I've read that the grid algorithm that Tk uses to size and place the widgets in your GUI is pretty complicated, so I have a feeling that may be the cause of the bug. But it's making it pretty difficult to pinpoint the problem. Here are two pictures that show the GUI at different sizes (notice the margin on the right side of the window):
Run 1: Run 2:
The bug started manifesting itself when I started adding widgets to the sub-contentframe @right_frame, so I have a feeling that may be where the problem lies.

If anybody is more familiar with Tk I would sincerely appreciate some insight.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top