in reply to SuperText Widget

Howdy,
actually I have never used PerlTK but a quick GoogleSearch produced a documentation at

http://www.lns.cornell.edu/~pvhp/ptk/doc/

which contains a description of the TextWidget. I dunno if this is the same as for your SuperText widget, but maybe this is useful for you:

$text->dlineinfo(index) Returns a list with five elements describing the area occupied by the display line containing index. The first two elements of the list give the x and y coordinates of the upper-left corner of the area occupied by the line, the third and fourth elements give the width and height of the area, and the fifth element gives the position of the baseline for the line, measured down from the top of the area. All of this information is measured in pixels. If the current wrap mode is none and the line extends beyond the boundaries of the window, the area returned reflects the entire area of the line, including the portions that are out of the window. If the line is shorter than the full width of the window then the area returned reflects just the portion of the line that is occupied by characters and embedded windows. If the display line containing index is not visible on the screen then the return value is an empty list.

Well, I'm sorry if this is not what you are looking for..

Regards Stefan K

Replies are listed 'Best First'.
Re: Re: SuperText Widget
by 2tall (Initiate) on Mar 30, 2001 at 19:07 UTC
    Thanks but I already saw that one. The problem is you have to pass it the line number on which you want information. But that is exactly what I want .. i.e The line number.
      OK,
      sorry 'bout that. Then I'm out here :(

      Regards Stefan K

        I found my answer. Just thought I'd share it with you guys. The SuperText widget uses the Text widget as a superclass so all of the functions of the Text Widget apply here. The Text widget has a function that will return the current line and column in the line.col format. $text_widget->index( 'insert ') should do the trick. Thanks again for your help stefan_k.