[comp.windows.x.motif] positioning cursor in XmText

dbeck@flopn2.csc.ti.com (Dave Beck) (02/27/91)

	This is probably an easy one, but I haven't seen it in the FAQ, 
so...
	I have been trying to position the cursor in a text widget 
upon the initial display of the widget and am not getting expected results. 
I am setting 'autoShowPosition' to True, 'cursorPositionVisible' to True, 
and 'cursorPosition' to n, where n is the number of characters from the 
beginning of the text. I had been setting these resources on creation of 
the Text widget.  I then found that the Motif 1.1 bug reports include 
one saying you can't set the 'cursorPosition' and 'value' at the same time.
I moved the XtSetArg for 'cursorPosition' and did an XtSetValues after 
creating and managing the widget, but this didn't work either.
	Positioning the cursor via mouse click is fine.  The widget DOES
have the input focus when it is first shown.   Scrolling the text seems
fine.   What I'm eventually after is a browsing system that brings up
a file viewer positioned at a routine the user wants to look at.  I am using 
Motif 1.1, X11R4 on a Sparc 1+.  

What am I missing?  Thanks for any help.

Dave Beck
dbeck@flopn2
Texas Instruments Software Systems and Applications Lab