[Tutor] text programme in graphical box
alan.gauld at freenet.co.uk
Wed Dec 29 23:24:39 CET 2004
> root = Tk()
> cv = Canvas(root, width=400, height=300, bg="blue")
> any way what i would like to do is create a programme that would run
> programme from this graphical box
You need to use a Text box not a Canvas. Canvas is for drawing
shapes and displaying images etc.
If you use a Text box you can simply convert your print messages
into insertions into the text box. Alternatrively use a simple
label but change the text each time. That way you only see the
Your prompts and inputs can be a label and Text Entry pair,
simply change the contents of the label and read the contents
of the entry box.
Examples of all of this can be found in the GUI and Case Study
topics in my tutorial.
Author of the Learn to Program web tutor
More information about the Tutor