Re: GtkTextView Questions -- please help! =]



Hi,

On Mon, 3 Mar 2003, Arash Nikkar wrote:
> 1)  I have created a window, with 2 textviews within it. Now I initialized
> the textviews the same way, but the top one is about 1/3 of the window,
> while the bottom is 2/3. I was wondering how i could set them to be the same
> length.

	This has to do with the container widget (hbox, vbox, table,
whatever) you put them in and the options that you set.  You should take a
look at the container docs or tutorial.

> 2) I have a scrolled window within both of the textviews, and i insert text
> line by line. For some reason, the scrollbars don't scroll down as text is
> inserted into the textviews. They have to be manually scrolled down. I was
> wondering if there is some way to fix that.

	The scrolled window has vertical adjustments associated with it.
If you want it to follow the text, you might have to manually get the
adjustments, change it accordingly, and go to it.  I'm not entirely sure
as I tend to put all my text in a char buffer and then put the buffer at
one time -- much faster.  Anyway, take a look at the documentation to
scrolled windows and it should lead you to a GTKAdjustment data structure
which you can read.

> 3) Is there anyway to set the attribute of a textview so that it will word
> wrap text that IS TYPED into the textview. I know how to word wrap text that
> you insert into a textview, but I cant figure out how to word wrap text that
> a user enters into the textview.

	...I don't know what you mean but manually, perhaps?  That is,
when a user hits the "Enter" key, you add the \n character to the buffer.

Ray







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]