dlineinfo

(#<widget> 'dlineinfo index)
Returns a list with five elements describing the area occupied by the display line containing index.

The list is a proper Tcl list.

A Tcl/Tk list is just a string. Tcl/Tk does use a list data type, but instead uses procedures which handle strings as list-typed data.

The procedure (tcl-llist->scheme-list str) converts a Tcl/Tk list to a proper cons'd Scheme list.

This is done in an heuristic manner. Numbers are converted to strings because of the text widget's index notation.

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.


© Author | Home | Sitemap