[Gtk-sharp-list] Selection Bounds

Pablo Fischer pablo@pablo.com.mx
Thu, 04 Dec 2003 13:04:43 -0600


Hi all!

I want to 'take' the selected text from a TextView, edit it, and change
it, I can edit it and change it, the problem cames: How to Select JUST
the selected text?.

I've tried with:
TextIter i1 = body_text.Buffer.StartIter;
TextIter i2 = body_text.Buffer.EndIter;
body_text.Buffer.GetSelectionBounds(out i1, out i2);
string new_text = String.Format("<i>{0}</i>",
				body_text.Buffer.GetText(
				body_text.Buffer.EndIter,
				body_text.Buffer.StartIter,
				false));

But doesn't works, it continues editing all the text of the TextView :(.

Thanks anyway!
Pablo
-- 
Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx)
http://www.pablo.com.mx
http://www.debianmexico.org
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C
Firma URL: http://www.pablo.com.mx/firmagpg.txt