Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!lll-winken!uunet!mcsun!mcvax!unido!pcsbst!meepmeep.pcs.com!jkh From: jkh@meepmeep.pcs.com (Jordan K. Hubbard) Newsgroups: comp.windows.x Subject: Getting more information from the textWidget Message-ID: <962@pcsbst.UUCP> Date: 23 Aug 89 21:25:12 GMT Sender: news@pcsbst.UUCP Reply-To: jkh@meepmeep.pcs.com (Jordan K. Hubbard) Organization: PCS Computer Systeme, GmbH Lines: 29 I have an application where I need to display a file (quickly) in a widget and hilight a line in it under program control. I also need to allow the user to scroll through this file, perhaps clicking on a line of particular interest (which will become the highlighted line). I decided to use an asciiStringWidget for this and quickly noticed a few things that it would be handy to have. 1. When the user clicks on a line, I need to know what line was clicked. I've defined my own selectionType array that disallows all but line selection, but querying the selection only gives me start and ending character positions. Given that the text widget keeps an internal line table, it seems a real shame that I have to duplicate its work by building a line table of my own and translating the start/end positions into a line number by brute force. This also keeps me from using an asciiDiskWidget, which is a lot closer to what I want in the first place. Likewise, when I want to highlight a line, I cannot do it except by means of my own internal table. 2. There doesn't seem to be any way of calling the action proceedures under program control. This would be useful. Jordan PCS Computer Systeme GmbH, Munich, West Germany UUCP: pyramid!pcsbst!jkh jkh@meepmeep.pcs.com EUNET: unido!pcsbst!jkh ARPA: jkh@violet.berkeley.edu or hubbard@decwrl.dec.com