[Gtk-sharp-list] Help, textview

Chris Howie cdhowie at gmail.com
Mon Feb 11 11:10:19 EST 2008


On Feb 8, 2008 9:04 AM, Darwin Reynoso <monouser at gmail.com> wrote:
> Hi,
> how do i select a line in a textview.

private void SelectLine(TextView view, int line) {
        TextBuffer buffer = view.Buffer;

        TextIter start = buffer.GetIterAtLine(line);
        TextIter end = buffer.GetIterAtLine(line + 1);

        buffer.SelectRange(start, end);
}

P.S. Documentation is a wonderful thing.

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers


More information about the Gtk-sharp-list mailing list