Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!src.honeywell.com!msi.umn.edu!sctc.com!pasturel From: pasturel@sctc.com (Pierre Pasturel) Newsgroups: comp.windows.x.motif Subject: Motif 1.0 XmText problem Summary: problem with marginHeight resource and XmText Keywords: XmText, marginHeight resource Message-ID: <1990Nov20.204225.23831@sctc.com> Date: 20 Nov 90 20:42:25 GMT Distribution: comp.window.x.motif Organization: Secure Computing Technology Corporation Lines: 77 I am getting the following X toolkit warning: X Toolkit Warning: Name: text5 Class: XmText Invalid margin height, must be >= 0. after the following piece of code has been executed several times in a loop: XtSetArg (args[0], XmNvalue, temp_holder_two); XtSetValues( LOCKtoTPT_Text, args, 1); where temp_holder_two is an array of 71 characters which never contains newlines (if that makes a difference), only reg. alpha-numeric characters and an occassional ^M (carriage return character) and where LOCKtoTPT_Text is an XmText widget created as follows: n = 0; XtSetArg (args[n], XmNcolumns, 70 ); n++; XtSetArg (args[n], XmNmarginHeight, 3 ); n++; /* default */ XtSetArg (args[n], XmNeditMode, XmSINGLE_LINE_EDIT); n++; XtSetArg (args[n], XmNeditable, FALSE); n++; XtSetArg (args[n], XmNcursorPositionVisible, False); n++; XtSetArg (args[n], XmNfontList, fontlist6x12); n++; LOCKtoTPT_Text = XmCreateText (line, "text5", args, n); I inserted the following code after the XtSetValues to find out the value of the marginHeight resource: XtSetArg (args[0], XmNmarginHeight, &margin_height); XtGetValues( LOCKtoTPT_Text, args, 1); printf("text5.marginHeight: %d\n",margin_height); and I got the following output for several iterations of the loop: text5.marginHeight: 15 text5.marginHeight: 23 text5.marginHeight: 31 text5.marginHeight: 39 text5.marginHeight: 47 text5.marginHeight: 55 text5.marginHeight: 63 text5.marginHeight: 71 text5.marginHeight: 87 text5.marginHeight: 95 text5.marginHeight: 103 text5.marginHeight: 111 text5.marginHeight: 119 text5.marginHeight: 127 text5.marginHeight: 135 text5.marginHeight: 143 text5.marginHeight: 159 text5.marginHeight: 167 text5.marginHeight: 175 text5.marginHeight: 183 text5.marginHeight: 191 text5.marginHeight: 199 text5.marginHeight: 207 text5.marginHeight: 215 and so on...., starting at 15 (why?) and always increasing by 8. The value probably eventually execeeded 2^^16 (the resource's type is a short int) and at which point I get the X toolkit warnings, which slow my application down and fills up my xterm from which I started the application. Any ideas what might be causing this problem?? What am I doing to increase this resource value and how can I prevent it so I don't get the zillions of warning messages?? Thanks In Advance Pierre pasturel@sctc.com