fineberg@ANTARES.MCS.ANL.GOV (08/04/89)
I am currently using an AsciiString widget in my application and want to read the text from the widget. If I use XtTextSetSelection it highlights the text but does not move it into buffer 0. If I click the mouse on it it does work properly. I would like to be able to read the contents of the widget without clicking on it. Is this a bug in the widget software, and is there another way to read the text from an AsciiString widget? Thanks, Sam Fineberg fineberg@mcs.anl.gov
kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (08/08/89)
> I am currently using an AsciiString widget in my application and want to read > the text from the widget. There is no need to complicate this by using selections. Just us XtGetValues() to retrieve the entire string and then you can index into the string at the position that you are interested in directly. > If I use XtTextSetSelection it highlights the text but does not move it into > buffer 0. This is correct XtTextSetSelection() only sets the primary selection, it makes no changes to Cut Buffer 0. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213