Re: newbie GtkTextView question
| From: | Yermo Lamers | Date: | Fri, 01 Sep 2006 23:12:50 +0000 |
| Subject: | Re: newbie GtkTextView question | ||
| References: | 1 2 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-7204@lists.php.net to get a copy of this message | ||
Yea, I crawled through that demo as well. I understand how tags work. But
in that demo it still only sets the buffer in the textview once.
What I'd like to do is continually add text to the textview over time and
have it display. Receive message -> append to text view. Send message ->
append to text view.
Does that mean I have to get the buffer from the text view, append text to
it and reset it each time? That seems to me to be a terribly wasteful
approach.
I guess I'm looking for an append_text_buffer() method in the GtkTextView.
I'm guessing I'm overlooking something terribly obvious but I just don't
see it.
-- Yermo
P.S. A basic Jabber client in PHP would be pretty cool, eh?
> OK I read to the bottom now. Did you look in the demos directory?
> phpgtk2-demo.php might help you out some.
>
> ----- Original Message -----
> From: "Yermo Lamers" <yml@dtlink.com>
> To: <php-gtk-general@lists.php.net>
> Sent: Saturday, September 02, 2006 12:37 AM
> Subject: [PHP-GTK] newbie GtkTextView question
>
>
>>
>> Thanks for the help with gtk::io_add_watch(). Works like a champ! I now
>> have the beginnings of a jabber client app that can correctly connect
>> and
>> log into an ejabberd server.
>>
>> What I would like to do now is create an XMPP trace window where I can
>> display a trace of messages going to and from the server. Ideally I'd
>> like
>> to format and color the messages so one can easily see what's coming in
>> and what's going out.
>>
>> For the life of me I can't figure out how to simply add text to a
>> GtkTextView. I've read everything in the php-gtk docs, read through the
>> list and read all the gtk.org docs, but I still just don't see it.
>>
>> I can set the entire buffer using set_buffer() just fine. Do I have to
>> get
>> the buffer using get_buffer(0, tack on some text and then reset it using
>> set_buffer() each time I want to add some text to the view? Or is
>> additional text considered a widget somehow that has to be anchored at
>> an
>> insertion point?
>>
>> Sorry for the noob question. Haven't worked in gtk before.
>>
>> Any suggestions or pointers to sample code would be greatly appreciated.
>>
>> -- Yermo
>>
>> ----------------------------------------------------------------------------
>> DTLink Software
>> http://www.dtlink.com
>> Business and Finance Software Engineering
>> ----------------------------------------------------------------------------
>>
>> --
>> PHP-GTK General Mailing List (http://gtk.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>> __________ NOD32 1.1380 (20060125) Information __________
>>
>> This message was checked by NOD32 antivirus system.
>> http://www.eset.com
>>
>>
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
----------------------------------------------------------------------------
DTLink Software http://www.dtlink.com
Business and Finance Software Engineering
----------------------------------------------------------------------------