Skip to content
Andrej Vodopivec edited this page Jul 1, 2015 · 1 revision

Text widget provides a rich text area.

Indices

Indices required for certain commands can be specified as strings in several forms: "line.char", "@x,y", "end", "tag.first", "tag.last".

Tags

Tags can be used to work with parts of the text displayed.

Functions for working with tags:

  • (text-tag-add txt tag &rest idxs) creates tag on ranges specified with idxs
  • (text-tag-bind txt tag ev fun)
  • (text-tag-cget txt tag opt)
  • (text-tag-configure txt tag &rest options) configures the text with tag tag
  • (text-tag-delete txt &rest tags)
  • (text-tag-lower txt tag &optional below)
  • (text-tag-names txt &optional idx)
  • (text-tag-raise txt tag &optional above)

Modifying the text

  • (text-delete txt idx1 &optional idx2)
  • (text-insert txt idx str)
  • (text-get txt idx1 &optional &idx2)

Tcl/Tk documentation for text.

Clone this wiki locally