Communication between frames
Posted: Thu Nov 17, 2011 1:39 am
Hello everybody. I am very, VERY new to wxwdigets and I've only checked a couple of tutorials.
I have a uni project of making a sparse array. Details are not needed, it just has three functions: insert, delete, and print.
So I thought I'd make a "central" frame with the appropriate three buttons. The insert and delete open frames with text control for input and insert/delete and close keys,
while the print opens a frame with a single static text control, which label is filled by my print function.
I went for frames (and not dialogs) because I hoped I could actualy make them nonmodal and have the print frame/static text control update each time I press the Insert key on the insert frame, or the delete key in the delete frame. Also, I'd like a frame not to be able to have a duplicate of itself (reminds modal, but i dont want to stop the control on the rest of the program).
I failed miserably. EG I tried to make a bool print_frame_exists, which would be set to false as default and each time the print frame is closed, and true when the print frame opens. Couldn't find a place to put it, since I need to call it both from the central frame (for the open) and from the print frame (for the close).
So...is there any advice on this? Or is "communication" improbable between frames?
I have a uni project of making a sparse array. Details are not needed, it just has three functions: insert, delete, and print.
So I thought I'd make a "central" frame with the appropriate three buttons. The insert and delete open frames with text control for input and insert/delete and close keys,
while the print opens a frame with a single static text control, which label is filled by my print function.
I went for frames (and not dialogs) because I hoped I could actualy make them nonmodal and have the print frame/static text control update each time I press the Insert key on the insert frame, or the delete key in the delete frame. Also, I'd like a frame not to be able to have a duplicate of itself (reminds modal, but i dont want to stop the control on the rest of the program).
I failed miserably. EG I tried to make a bool print_frame_exists, which would be set to false as default and each time the print frame is closed, and true when the print frame opens. Couldn't find a place to put it, since I need to call it both from the central frame (for the open) and from the print frame (for the close).
So...is there any advice on this? Or is "communication" improbable between frames?