Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!samsung!emory!gatech!ncsuvx!news From: escott@eos.ncsu.edu (Erik Scott) Newsgroups: comp.windows.x.motif Subject: XmTextSetString to remove text Message-ID: <1991Jan30.212031.3645@ncsuvx.ncsu.edu> Date: 30 Jan 91 21:20:31 GMT Sender: news@ncsuvx.ncsu.edu (USENET News System) Reply-To: escott@eos.ncsu.edu (Erik Scott) Organization: North Carolina State University Lines: 30 (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); And the text is still there. It has the XmNeditable resc. set to True. Since that didn't work, I tried: XtDestroyWidget(text); ac = 0; XtSetArg (al[ac], XmNrows, 24); ac++; XtSetArg (al[ac], XmNcolumns, 80); ac++; XtSetArg (al[ac], XmNresizeWidth, False); ac++; XtSetArg (al[ac], XmNresizeHeight, False); ac++; XtSetArg (al[ac], XmNscrollVertical, True); ac++; XtSetArg (al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++; text = XmCreateScrolledText (parent, "text", al, ac); XtManageChild(text); which did work but is a bit brutal for my tastes (besides, I would have to rewrite a LOT of code to make that work right). What is the 'best' way to remove text from a Text widget? erik scott escott@eos.ncsu.edu