Hi. I need to have two frames (not necessarily visible together and possibly more than two), and I need to be able to interact between them.
For example - if I have two frames, one visible and one not visible. Clicking a button on frame1 will make frame1 invisible and frame2 visible. On frame2 I might want to edit the contents of a list that is on frame1, so that when frame2 becomes invisible/closes and frame1 becomes visible again, the updates to the list (or other controls) would already have been made.
I have used wxGlade to create code with two frames, but I cant seem to work out how to show, hide or otherwise interact between them. The closest I have come is by doing this in a button event on frame1:
frame_2 = Window2(None, -1, "")
frame_2.label_2.SetLabel("fred")
frame_2.Show()
This seems to work, but only up to a point, because when I try to access anything on frame1 from frame2 I only open another instance of frame1. Clearly I have something fundamentally wrong!
Could someone point me in the right direction please, either by explaining how to access the controls on multiple forms, or perhaps explaining a better way to do this?
Many thanks
Max