Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!EXPO.LCS.MIT.EDU!kit From: kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) Newsgroups: comp.windows.x Subject: Re: text selection Message-ID: <8907252056.AA05901@expo.lcs.mit.edu> Date: 25 Jul 89 20:56:27 GMT References: <3758@ncar.ucar.edu> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 22 > I would like to have a callback procedure invoked whenever a user selects > a portion of text from a Text Widget (Athena Widget Set). The callback > should return the selected text. Is there a simple way to do this? How? How about adding your own action like this: : extend-end(PRIMARY, CUT_BUFFER0) MyAction() \n\ : extend-end(PRIMARY, CUT_BUFFER0) MyAction() Since actions are called in order there should always be a good selection when you action routine is called. Of course, if the user modified his translation table then your action may not be called. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213