Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!usc!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: pete@iris49.biosym.COM (Pete Ware) Newsgroups: comp.windows.x Subject: Motif 1.1 problem with shells and XtRealize and XtUnrealize Message-ID: <9106101647.AA16582@iris49.biosym.com> Date: 10 Jun 91 16:47:17 GMT References: <33913@shamash.cdc.com> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 42 dka> My application requires many windows to pop up in response to a dka> selection from a menu bar. The windows that are popped up are too dka> complex to use a pop up shell and XtPopup and XtPopdown. ( It is dka> my understanding that a pop up shell can only be the parent of dka> one composite or simple widget. My pop up windows are neither of dka> these. ) My solution to get around this was to create all "pop dka> up" windows as children of topLevelShells or applicationShells. dka> Then I could Realize and Unrealize the shells as they were dka> needed. I could be completely wrong, but I think you are completely missing the point of using widgets. A shell may only be able to hold one child widget, but that child is free to contain as many children as it implements (ad infinitum). For example, a typical dialog box may have: Shell Pane ScrolledWindow Form label1 ... label_n RowColumn label1 ... label_n ... You can see the Shell only has one child. dka> The problem is that consecutive calls to XtRealize and dka> XtUnrealize do not work. The widgets act like they are ignoring dka> input after the second call to XtRealize the shell. You really want to popdown the shells. Also, you may need to wait until returning to your event loop to get the second XtRealize to take effect. Also, I'm not sure how the Motif dialog shell's respond to XtRealize/Unrealize while popped up. dka> I do know that an option is to create and destroy the widgets dynamically dka> instead of creating all widgets in the beginning of my programs execution. It may be that the Motif dialog shells all pop themselves up whenever the child is managed. If you delay managing the shell until you want to pop it up, things may work. --pete