crouch@crunchie.axion.bt.co.uk (the man whose head expanded) (10/05/89)
Once I've got an editable text widget with some text in it, how do I get this text out, either to a file or to a buffer? Any help will be appreciated. Chris ------------------------------------------------------------------------------ Chris Rouch crouch@axion.bt.co.uk RT3141, BTRL, Martlesham Heath, Ipswich, England. +44 473 646093 unspoilt by progress
kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (10/11/89)
> Once I've got an editable text widget with some text in it, how do I get > this text out, either to a file or to a buffer? When you create a text widget you must pass it an allocated string as the XtNstring resource, and a length of this buffer. The R3 Text widget uses this string in place, so you can just reference this string pointer to get the text out of a text widget. You may also be able to use XtGetValues on the XtNstring resouces to get the string pointer. CAUTION: Do not modify this buffer, the text widget keeps internal state and modifying its buffer will really confuse the text widget. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213