INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

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

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

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

(OP)
Here is my source code: https://github.com/DrewKestell/RPG/blob/master/RPG...

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: http://i.imgur.com/c6p8vpQ.png
Run 2: http://i.imgur.com/m5hZ45B.png

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close