Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!crdgw1!lorensen From: lorensen@dwaskill.crd.ge.com (william e lorensen) Newsgroups: comp.windows.x.motif Subject: Re: inserting large string into popped up text widget ... goes nuts Message-ID: Date: 3 Jan 91 22:05:26 GMT References: <1991Jan3.022240.13828@tse.uucp> Sender: news@crdgw1.crd.ge.com Organization: GE Corporate Research & Development Lines: 49 In-reply-to: cont1@tse.uucp's message of 3 Jan 91 02:22:40 GMT In article <1991Jan3.022240.13828@tse.uucp> cont1@tse.uucp (Contractor #1 = Tim Horton) writes: Path: crdgw1!rpi!zaphod.mps.ohio-state.edu!wuarchive!cs.utexas.edu!news-server.csri.toronto.edu!utgpu!utzoo!censor!geac!tse!cont1 From: cont1@tse.uucp (Contractor #1 = Tim Horton) Newsgroups: comp.windows.x.motif Date: 3 Jan 91 02:22:40 GMT Sender: cont1@tse.uucp Reply-To: tjhorton@vis.toronto.edu Organization: Toronto Stock Exchange Lines: 24 Is there any way to avoid this? ... In motif 1.0, if a text widget is popped up, and I set it's string value to something relatively long, it *slowly* *gracelessly* resizes itself to accomodate the string. For example, a scrolled text widget will go through the string value from top to bottom, figuring out the number of lines and the size of each line, and after *each* line it resets/redraws the scrollbars (or rather, the scrolling widget around the text widget gets a resize notification from the text widget after each line is processed, causing the scrollbars to be reset/redrawn each time). Anyways... THIS IS RIDICULOUS. From time to time I have a 400 line chunk of text to stuff in. The behavior looks ridiculous, it takes a *minute* or so, and meanwhile the application is basically hung. The code: XmTextSetString(myTextWidget, bigString); /* wow! */ Does this seem slightly bizarre to anyone else but me? Is it time for me to turn in my .Xdefaults, for good? Is there really a higher bitplane? When you can't have X anymore, is there anything left to life? For these and other answers, thanks in advance, tjhorton@vis.toronto.edu (alias cont1@tse.uucp) Try: XtUnManageChild (myTextWidget); XmTextSetString(myTextWidget, bigString); /* wow! */ XtManageChild (myTextWidget); -- Bill Lorensen US Mail:GE Corporate Research and Development P.O. Box 8 Bldg KW Room C207A Schenectady, NY 12301 Office: (518) 387-6744 or 8*833-3874 Fax: (518) 387-6560 or 8*833-6560 E-Mail: lorensen@crd.ge.com