Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!agate!shelby!msi.umn.edu!sctc.com!pasturel From: pasturel@sctc.com (Pierre Pasturel) Newsgroups: comp.windows.x.motif Subject: Re: XmTextSetString to remove text Message-ID: <1991Jan31.151055.27119@sctc.com> Date: 31 Jan 91 15:10:55 GMT References: <1991Jan30.212031.3645@ncsuvx.ncsu.edu> Organization: SCTC Lines: 29 escott@eos.ncsu.edu (Erik Scott) writes: >(Motif 1.1, DEC PMAX (Mips-chip), MIT X11R4 Server) >I have a multi-line text widget, called text, that contains a lot >of text. I would like to remove this text, so I try this: > erik[0]='\0'; > XmTextSetInsertionPosition(text,0); > XmTextSetString(text, erik); To clear a text, I simply do XmTextSetString( text_widget, "" ), although I don't see how this is different from yours. I also have learned to do a few XFlush()'s when I want to make sure the text gets refreshed immediately in a callback, followed by an XmUpdateDisplay() call. >And the text is still there. It has the XmNeditable resc. set to True. This should not matter. Setting it to TRUE simpley allows the User to edit the text. The application should always be able to as far as I know. >erik scott escott@eos.ncsu.edu Pierre pasturel@sctc.com