alan@metasoft.UUCP (Alan Epstein) (04/30/91)
I have built a motif text widget which is to resize itself as necessary as text is entered. I cannot seem to find a combination of resources to cause this to occur. I have also tried both Text and ScrolledText widgets without result. Do the resize attributes work, and if so, could someone send the magic set of XtSetArg's which can make this happen. Thanks. ----------------------------- Alan Epstein Meta Software Corp UUCP: ...bbn!metasoft!alan 150 Cambridgepark Dr Internet/ARPA: alan%metasoft@bbn.com Cambridge, MA 02140 USA -----------------------------
nazgul@alfalfa.com (Information Junkie) (05/01/91)
> > I have built a motif text widget which is to resize itself as necessary > as text is entered. I cannot seem to find a combination of resources to > cause this to occur. I have also tried both Text and ScrolledText widgets > without result. This is usually a problem with the parent of the text widget rather than the widget itself. What parent are you using? Alfalfa Software, Inc. | Poste: The EMail for Unix nazgul@alfalfa.com | Send Anything... Anywhere 617/646-7703 (voice/fax) | info@alfalfa.com I'm not sure which upsets me more: that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's.
roger@zuken.co.jp (Roger Meunier) (05/02/91)
In article <2136@metasoft.UUCP> alan@metasoft.UUCP (Alan Epstein) writes: > Do the resize attributes work, and if so, could someone send the magic > set of XtSetArg's which can make this happen. I have had success setting the resizeWidth resource to "true" in my resource file (I have not tried setting it from the application). There may be some constraining factors which you did not include in your post. What is the parent widget? If it is a Frame, it needs to be wide enough to allow the Text widget to grow. Have you set the columns resource of the Text widget to accomodate long strings? What other resources have you set for the Text widget, its parent, and the Shell widget? There may be some combination which is inhibiting the resize. Hope this helps. -- Roger Meunier @ Zuken, Inc. Yokohama, Japan (roger@zuken.co.jp)
berlage@gmdzi.gmd.de (Thomas Berlage) (05/02/91)
In article <2136@metasoft.UUCP>, alan@metasoft.UUCP (Alan Epstein) writes: > > I have built a motif text widget which is to resize itself as necessary > as text is entered. I cannot seem to find a combination of resources to > cause this to occur. I have also tried both Text and ScrolledText widgets > without result. Whether resizing is allowed is controlled by all manager widgets in the hierarchy. First of all you have to set XmNallowShellResize of the toplevel shell to True. Other manager widgets may have similar resources. Thomas Berlage (berlage@gmdzi.gmd.de), GMD, Germany
alan@metasoft.UUCP (Alan Epstein) (05/08/91)
> > Do the resize attributes work, and if so, could someone send the magic > > set of XtSetArg's which can make this happen. As it turns out, widget writers, it is the PARENT'S responsiblity to change the child's geometry during a resize request. It is not sufficient to merely return XtGeometryYes. Thanks all for the help. ----------------------------- Alan Epstein Meta Software Corp UUCP: ...bbn!metasoft!alan 150 Cambridgepark Dr Internet/ARPA: alan%metasoft@bbn.com Cambridge, MA 02140 USA -----------------------------
nazgul@alfalfa.com (Information Junkie) (05/11/91)
> > > Do the resize attributes work, and if so, could someone send the magic > > > set of XtSetArg's which can make this happen. > > As it turns out, widget writers, it is the PARENT'S responsiblity to > change the child's geometry during a resize request. It is not > sufficient to merely return XtGeometryYes. If the parent is doing the resize it should return Done. If it isn't it should return Yes. If that doesn't work then something is wrong. Alfalfa Software, Inc. | Poste: The EMail for Unix nazgul@alfalfa.com | Send Anything... Anywhere 617/646-7703 (voice/fax) | info@alfalfa.com I'm not sure which upsets me more: that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's.
alan@metasoft.UUCP (05/14/91)
> As it turns out, widget writers, it is the PARENT'S responsiblity to > change the child's geometry during a resize request. It is not > sufficient to merely return XtGeometryYes. If the parent is doing the resize it should return Done. If it isn't it should return Yes. If that doesn't work then something is wrong. Well, reading the code for Xt/Geometry.c, it appears that returning Done would not cause XConfigureWindow to be executed. I believe that Yes makes the most sense here, with the parents geometry_manager making the actual change to the child's core part. Thanks again for your pointers. ----------------------------- Alan Epstein Meta Software Corp UUCP: ...bbn!metasoft!alan 150 Cambridgepark Dr Internet/ARPA: alan%metasoft@bbn.com Cambridge, MA 02140 USA -----------------------------
nazgul@alfalfa.com (Information Junkie) (05/15/91)
> Well, reading the code for Xt/Geometry.c, it appears that returning > Done would not cause XConfigureWindow to be executed. I believe that Right, nor should it. You return Done if you already called XtResizeWidget (or the equivalent) - in which case XConfigureWindow has already been called. Alfalfa Software, Inc. | Poste: The EMail for Unix nazgul@alfalfa.com | Send Anything... Anywhere 617/646-7703 (voice/fax) | info@alfalfa.com I'm not sure which upsets me more: that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's.