1

I'm using EasyGui in Python 2.7. I would like to do something along the lines of:

  1. In one window, Have 5 text entry boxes
  2. Underneath this in the same window, a multiple choice option where I can select one of three options
  3. Underneath this in the same window, a different multiple choice question with three different options.

If the values are stores as a list, I could use the answers as variables later in my script. i can't find anything about combinations online for EASYGUI, will I have to use Tkinter? is there another simple python GUI tool that can do this?

Thanks.

Tandy Freeman
  • 528
  • 5
  • 15
  • 3
    No, `easygui` won't let you do what you describe. It's designed to allow one type of input per function call which typically each display in a separate window. You're going to need to use `Tkinter` directly, which is included with Python releases, or a third party extension like `wxPython`. The former would probably be simpler for what you to do, and although the documentation for it is poor, there are a large number of examples and tutorials for it online. Since `easygui` uses `Tkinter` internally, mixing its use with direct calls would be relatively easy — as would extending the library be. – martineau Nov 15 '15 at 17:10
  • 1
    Thanks for getting back to me. I think you've thoroughly answered my question, repost it as an answer and I'll give you the rep. – Tandy Freeman Nov 15 '15 at 18:03
  • 1
    Thanks for offering, but that's OK. What I did with one project I worked on that used `easygui` was modify the existing `textbox` function to accept optional keyword arguments to allow the addition of up to two buttons to the windows it created (which was all the extra functionality I needed). Doing this not only solved my problem, it also forced me to learn enough `Tkinter` to do it (which seemed easier than starting from scratch). – martineau Nov 15 '15 at 19:53
  • I get what you're saying. Thanks for taking the time, I appreciate the insight! – Tandy Freeman Nov 15 '15 at 22:26
  • 1
    The existing [`multenterbox()`](http://easygui.readthedocs.org/en/master/_modules/easygui/boxes/derived_boxes.html#multenterbox) function sounds closest to what you want, so you could modify it or create a new function modeled after it that does what you want. – martineau Nov 16 '15 at 01:05

0 Answers0