krupczak@secola.Columbia.NCR.COM (Bobby Krupczak) (10/27/90)
Hi! I had some questions regarding the Motif text widget that I was hoping a motif expert could answer. I hope they havent been asked before. 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. 2) If I set the resource XmNscrollVertical to true, should a scrollbar appear when the widget is realized? I have read the man page and it indicates so. Thanks in advance for the help Bobby
ogawa@sm.sony.co.jp (Masato Ogawa) (10/27/90)
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 ==========================================================================