Saturday, April 27, 2013

Resizing the Choice Box

     As I said, I was going to tell you how to resize the enter box. It's a bit complicated, so be careful!
     1: Find the section in the easygui.py file that starts with def __choicebox, maybe around line 613. Remember that most editors, including SPE, show you the code line numbers somewhere near the bottom of the window.
     2: About 30 lines down from that (around line 645), you'll see some lines that look like this:

root_width = int((screen_width * 0.8))
root_height = int((screen_height * 0.5))

     3: Change the 0.8 to 0.4 and the 0.5 to 0.25. Save the changes to easygui.py. The next time try the choice box, it will be smaller.

No comments:

Post a Comment