Re: scrolling and GtkTextView
- From: Razvan <razvaneduard xnet ro>
- To: razvaneduard xnet ro
- Cc: gtk-app-devel-list gnome org
- Subject: Re: scrolling and GtkTextView
- Date: Fri, 08 Nov 2002 15:43:41 +0200
found a solution to the scrooling problem: use marks:
gtk_text_view_scroll_to_mark(GTK_TEXT_VIEW(ircSp->textView),mark,0.0,FALSE,1,1);
Probably because in docs at gtk_text_view_scroll_to_iter() is write:
"NOTE: This function uses the currently-computed height of the lines in
the text buffer. Note that line heights are computed in an idle handler;
so this function may not have the desired effect if it's called before
the height computations. To avoid oddness, consider using
gtk_text_view_scroll_to_mark() which saves a point to be scrolled to
after line validation."
:))
Razvan wrote:
I noticed some behavior of scrolling in a GtkTextView
I insert a line of text at the end of the:
GtkTextIter iter;
gtk_text_buffer_get_end_iter(textBuffer,&iter);
gtk_text_buffer_insert(textBuffer,&iter,"this is a line\n", -1);
and then when I scroll to the iter (which now is at the and of text
buffer)
gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(ircSp->textView),&iter,0.0,TRUE,1,1);
it scrolls only to show this line "this is a line\n" and not the last
line in text buffer (which is an empty line) which can be seen in
GtkTextView
Is this normal? I'd like to scroll all the way down to see the last
empty line in GtkTextView
Thanks
--
Razvan
razvaneduard xnet ro
-------------------------------------------------------
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus.
Xnet automatically scans all messages for viruses using RAV AntiVirus.
Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor. Va rugam sa luati in
considerare ca exista un risc de fiecare data cand deschideti fisiere atasate si ca MobiFon nu este
responsabila pentru nici un prejudiciu cauzat de virusi.
Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants. Please be aware that there
is a risk involved whenever opening e-mail attachments to your computer and that MobiFon is not responsible
for any damages caused by viruses.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]