Path: utzoo!attcan!uunet!midway!ncar!elroy.jpl.nasa.gov!usc!cs.utexas.edu!sun-barr!ccut!wnoc-tyo-news!scslwide!wsgw!wsserva!ogawa From: ogawa@sm.sony.co.jp (Masato Ogawa) Newsgroups: comp.windows.x.motif Subject: Re: Questions about Motif Text widget Message-ID: Date: 26 Oct 90 23:08:13 GMT References: Motif text widget <619@secola.Columbia.NCR.COM> Sender: news@sm.sony.co.jp Organization: Workstation Div., Sony Corp., Japan Lines: 21 In-reply-to: krupczak@secola.Columbia.NCR.COM's message of 26 Oct 90 19:12:13 GMT In article <619@secola.Columbia.NCR.COM> krupczak@secola.Columbia.NCR.COM (Bobby Krupczak) writes: > 1) I would like my newly created text widget to display some text read in > from a file. Is it enough to use the XmNvalue resource of the text widget? > Right now, I am reading the file into a buffer, using XmCreateString() to > create a XmString and then using XtSetArg() to indicate to the widget > that I want this text displayed. It does not seem to work. Text doesn't support XmString. Use raw (char *) data for XmNvalue resource. The function: XmTextSetString(w, value) Widget w; char *value; is convenience. ========================================================================== Masato Ogawa Sony corp. ogawa@sm.sony.co.jp Tokyo, Japan ==========================================================================