[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Invisible text in a GtkTextView
- From: Jeffrey Goddard <moosewood mooseroot org>
- To: Neoklis Kyriazis <neoklisk cytanet com cy>
- Cc: GTK Apps Devel List <gtk-app-devel-list gnome org>
- Subject: Re: Invisible text in a GtkTextView
- Date: Wed, 8 Jan 2003 22:17:31 -0600
hi Neoklis,
I'm using a scrolled window and text buffer to display my "debug text"
messages, and the text "flickers" as the lines are being written. Maybey you
could do something like:
read_data_block();
write_data_block();
scroll_to_bottom();
this might clear up the problems with display.
Jeffrey
On Sunday 05 January 2003 12:17, Neoklis Kyriazis wrote:
> Hi all
>
> I have almost completed my first GTK+ app using Glade-2 but I am stuck
> with a final problem re. text written to a GtkTextView remaining
> invisible sometimes. My app uses idle callback functions to read blocks
> of data from the sound card and this is done by a blocking read()
> at intervals of about 1/2 sec. The idle callbacks return TRUE after each
> block of data is read so that control does reach gtk_main() but written
> text remains invisible until reading is stopped. However, scrolling the
> text viewer up-down reveals the written text. Additionally, coloring of
> the text sometimes is incorrect, eg text with red attr apeears normal
> black but scrolling again usually corrects the color.
>
> I am using the following code to write text and scroll the viewer so
> that it always shows the last lines written:
>
> /* Print message */
> gtk_text_buffer_insert_with_tags_by_name( gbl_text_buffer, &iter,
> message, -1, attr, NULL);
>
> /* Scroll Text View to bottom */
> adjustment = gtk_scrolled_window_get_vadjustment
> ( GTK_SCROLLED_WINDOW(gbl_text_scroller) );
>
> gtk_adjustment_set_value( adjustment, adjustment->upper );
>
> Any advice on this greately appreciated!
>
> My thanks in advance.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]