| Extracted from Pike v7.8 release 866 at 2018-07-18.

[Top]
GTK2
GTK2.Entry

# Method GTK2.Entry()->get_layout_offsets()

Method get_layout_offsets

  `mapping get_layout_offsets()`

Description

  Obtains the position of the Pango.Layout used to render text in the entry, in widget coordinates. Useful if you want to line up the text in an entry with some other text, e.g. when using the entry to implement editable cells in a sheet widget.

  Also useful to convert mouse events into coordinates inside the Pango.Layout, e.g. to take some action if some part of the entry text is clicked.

  Keep in mind that the layout text may contain a preedit string, so layout_index_to_text_index() and text_index_to_layout_index() are needed to convert byte indices in the layout to byte indices in the entry contents.