Re: GtkTextView Questions -- please help! =]
- From: Raymond Wan <rwan cs mu oz au>
- To: Arash Nikkar <arash umail ucsb edu>
- Cc: gtk-list gnome org
- Subject: Re: GtkTextView Questions -- please help! =]
- Date: Wed, 5 Mar 2003 23:10:15 +1100 (EST)
On Tue, 4 Mar 2003, Arash Nikkar wrote:
> so quick explaination of the code, I have a paned widget, I create 2 scrolled
> windows with textviews in them. I create them the same way, and add the to the
> panel, then I add the panel to the table. You would think that the size of the
> scrolled windows would be the same.
I've actually never used a panel, but I did notice you're creating
a table of size 1x4. If you're going to do that, why don't you create a
vbox instead?? Also, I had a weird problem with a table before and I
couldn't understand why...there's a gtk_table_attach that does it with
defaults and using it solved my problems. Give that a try as well.
> 3) If you look in the code above, you will see the line:
>
> gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(temp->input), GTK_WRAP_CHAR)
My understanding is that GTK_WRAP_WORD breaks lines between words.
GTK_WRAP_CHAR can break a line anywhere, even within words.
> i was hoping that this would set the scrolled window to wrap text, however, it
> does not. In this textview, users will type in text, and then once they hit a
> button, it will go to the other textview. Just like a instant message (this is
> actually what it is). But for some reason it doesn't work, and as text is typed,
> it never wraps. I was wondering if you had any suggestions. Thanks for your help!
I still think my original idea of doing it manually (that is, when
it gets to the end of a line, erase the current word, add a new line
character, and then write the word out) is better as you have more control
with what's going on. I don't know word wrapping well in GTK+ (though I
use it, but not like what you're doing) but I have a feeling it wouldn't
word wrap as text is being typed. Anyway, you say "just like a instant
message" system, but perhaps instant message systems also handle this
manually??
Ray
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]