Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!linus!linus!pop From: pop@linus.mitre.org (Paul O. Perry) Newsgroups: comp.windows.x.motif Subject: Reparenting Widgets Dynamically ? Message-ID: Date: 6 Dec 90 16:26:28 GMT Sender: usenet@linus.mitre.org Distribution: comp.windows.x.motif,comp.windows.x,mitre.motif Organization: The MITRE Corporation Lines: 24 How is it possible to reparent a widget dynamically ? I tryed XReparentWindow(XtDisplay(w), XtWindow(w), ...) but this seems like a sneaky thing to to a widget; in fact, a query to XtParent(w) showed that the widget did not consider its parent changed (of course). If I XtUnamanageChild(w) I don't get to XtManageChild(w) to a different parent. I'm trying to allow a user to move an XmPushButton from one XmForm to another. I think that creating and destroying every time could be expensive, and that managing and unmanaging a widget per form that I have could also be expensive. What I think I will have to do is to parent my buttons further back in the instance hierarchy but I will loose the management that I had from the different forms. Does this make sense to anyone ? Any other tricks available ? Thanks, Paul. -- Paul O. Perry MITRE Corporation Phone: (617) 271-5230 Burlington Road ARPA: pop@mitre.org Bedford, MA 01730 UUCP: ...{decvax,philabs,genrad}!linus!pop