[comp.windows.x] Select Word with one button click

y2@DINORAH.WUSTL.EDU (06/07/89)

I have a non-editable AsciiStringWidget which contains texts made of
multiple lines.  Each of the line starts with a word followed by its
description.  I would like to cut the leading word into CUT_BUFFER0 by
one button click while mouse is placed at any position on that line.
Several attempts were made with existing key bindings, none of them
worked quite the way it should be.  The bindings and the results are
summarized as follow:

<Btn1Down>: select-start() beginning-of-line() select-word() \n\
---the leading word was highlighted then unhighlighted, CUT_BUFFER0
did not change
<Btn1Down>: select-start() beginning-of-line() select-word()
select_end() \n\
--- behave same as above
<Btn1Down>: select-start() beginning-of-line() select-word()
select_end(PRIMARY,CUT_BUFFER0) \n\ --- behave same as above
<Btn1Down>: select-start() beginning-of-line() select-word()
extend-end(PRIMARY,CUT_BUFFER0) \n\ --- the leading word was
highlighted, then highlight extended or retracted to mouse position,
but CUT_BUFFER0 contains the resulting highlighted string.

If anybody can give me some direction, I will greatly appreciate it.


TIA
Yeong Yeong Liu
	{uunet...}!wucs1!dinorah!y2	or
	wucs1.wustl.edu!dinorah!y2	or
	y2@dinorah.wustl.edu		or
	314-362-2950