Re: [gtk-list] Gtk--: Adding scrollbars to text widget
- From: The Nolander <nolander krixor xy org>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Gtk--: Adding scrollbars to text widget
- Date: Mon, 6 Jul 1998 00:58:18 +0200 (CEST)
> Hi,
> I'm having one heck of a time adding a vertical scrollbar to a
> Gtk_Text
> object. I've figured out that Gtk_Text has a 'vadj' and 'hadj' of type
> Gtk_Adjustment. And so I need to give Gtk_VScrollBar the 'vadj' to get
> it to work. But I couldn't figure out how to do that :-(. I've tried
> useing gtkobj() to get it, and some other stuff, but....nope.
I created a scroll-window and added the text widget.
It's there, but I wouldn't say it worked as I expected.. gtk_text_insert()
just seem to totally disregard my wish that it should append the text, not
delete everything else and then print it first.
Else.. GTK tutorial chapter 11:
vscrollbar = gtk_vscrollbar_new (GTK_TEXT(text)->vadj);
gtk_box_pack_start(GTK_BOX(hbox), vscrollbar, FALSE, FALSE, 0);
gtk_widget_show (vscrollbar);
text is a gtk_text_new(NULL, NULL);
I use gtk_text_insert(GTK_TEXT(recvtext), NULL, NULL, NULL, tmp, strlen(tmp));
in a loop, not doing anything else with it. Doesn't matter if I use
gtk_text_set_point() before I experience the same problem that it just
clears everything first and then puts it on the first line.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]