Re: Multiline Textbox...
- From: Dimitar Haralanov <voidtrance comcast net>
- To: gtk-app-devel-list gnome org
- Subject: Re: Multiline Textbox...
- Date: Mon, 5 Jan 2004 18:20:30 -0800
On Fri, 02 Jan 2004 17:04:54 -0500
hpnadig <hpnadig lycos co uk> wrote:
what should I do to define the text range from start to the end of the
text view?
Use gtk_text_buffer_get_bounds() to get the start and end iterators.
GtkTextIter *start, *end;
view = gtk_text_view_new ();
// my text view..
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
gtk_text_buffer_set_text (buffer, "My test Message from code..",-1);
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 30);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (popup)->vbox),
view, TRUE, TRUE, 0);
gtk_text_buffer_get_bounds (buffer, start, end);
text = gtk_text_buffer_get_text (bugger, start, end, TRUE);
NOTE: I have not tested this code but it should work.
--
Mitko Haralanov
voidtrance at comcast dot net
http://voidtrance.home.comcast.net
==========================================
Everybody needs a little love sometime; stop hacking and fall in love!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]