Package: gtk
Function gtk:label-layout-offsets
Lambda Listgtk:label-layout-offsets (label) ArgumentsReturn Value x -- an integer with the x offset y -- an integer with the y offset Details Obtains the coordinates where the label will draw the pango:layout
object representing the text in the label.
This is useful to convert mouse events into coordinates inside the pango:layout object, for example, to take some action if some part of the label is clicked. Remember when using the pango:layout functions you need to convert to and from pixels using the pango:pixels function or the pango:+scale+ constant. Examples(gtk:label-layout-offsets (gtk:label-new)) => 0 => -9 (gtk:label-layout-offsets (gtk:label-new "text")) => -14 => -9 | See also |
2024-10-28