Please note - I had posted this message earlier today and then saw the instructions to attach code, rather than paste it into the message. Plus I tried to clean up the code to a more simple application. So I am re-posting with new code attached. Sorry for the inconvenience.
I am trying to learning both python and wxpython. I used wxglade to
design a gui, and now I am putting in some code to see how it works.
I have a frame that contains a panel that contains (in the following
order top to bottom) a StaticText widget (label_1), a TextCtrl widget
(text_ctrl_1), a StaticText widget (label_2) and a TextCtrl widget
(text_ctrl_2).
The frame also contains a menu bar that has several menu items,
including “Exit” and “Clear Send.” As of now, the only menu items
that are “active” are “Exit” and “Clear Send.” The others are not
bound to any events.
I want text_ctrl_1 to be read only - ultimately, the script will write
text there.
I want the user to be able to type text into text_ctrl_2 (this seems
to work fine).
I want the user to be able to clear text_ctrl_2 by selecting “Clear
Send” from the menu – this is not working.
I want the user to be able to exit by selecting “Exit” from the menu
– this is not working.
When the user selects either “Clear Send” or “Exit,” nothing happens.
I am sure that I am missing something very obvious. I have searched
the Net for several hours trying to see what my issue could be but
haven’t found anything yet, so I thought I would ask here. I
apologize in advance for my ignorance.
Thanks for you help and patience.
Regards,
Russ
SimpleTerm2.py (4.06 KB)