[gtkada] About line numbers in Text View

Emmanuel Briot briot at adacore.com
Fri Nov 28 14:24:29 CET 2014


On 27 Nov 2014, at 19:45, Osmanys Fuentes Lombá <osmanys at cies.cu> wrote:

> Hello, someone please give an idea: I have a text view widget and I want to sow the line numbers of the text buffer, how I can do that?

You would connect to the "move-cursor" signal on the view, probably passing "After=>True" when
you connect so that your callback is called after gtk+ has done the actual move.
Then you look at the current position of the Insert mark, and display the corresponding line
number.

regards
Emmanuel


More information about the gtkada mailing list