samedi 28 octobre 2017

Program having dropdown lists and checkboxes, prints statements based on which options were chosen?

I want to make a desktop program that has a bunch of dropdown lists and checkboxes, and based on the options I choose from the dropdown lists and which checkboxes are checked/ticked, the program prints out a desired set of outputs in the form of text statements.This set of outputs changes depending on what my inputs are.

Example Template:-
Dropdown1 has [option11, option12]
Dropdown2 has [option21, option22, option23]
Checkbox1 has [statementA that can be ticked or unticked]
Dropdown3 has [option31, option32]
"RUN button" to calculate results.


Outputs Logic:-
If [Dropdown1=11, Dropdown2=21, Checkbox1=TICKED, Dropdown3=31]
Print out [StatementX + StatementY]

If [Dropdown1=11, Dropdown2=21, Checkbox1=TICKED, Dropdown3=32]
Print out [StatementZ]

Etc... until all possible variations are defined.


Note that only one option must be picked for each dropdown list, and it should display the option I picked, otherwise display it as blank to indicate that I haven't picked any option yet. Also, the program should return an error if any dropdown list was left blank.
I only need the basic script that does this task EXACTLY, and I will be modifying the options and statements for my actual needs. Please also show me how to run the program, and how to modify it if this wasn't very obvious in the script. Any programming language is fine, but I prefer the program to be in Python/PyGTK or Java. Thanks! :)




Aucun commentaire:

Enregistrer un commentaire