Re: How does one set background color for entire line in textview? <- not possible
- From: Tony Freeman <tony freeman insightbb com>
- To: gtk-app-devel-list gnome org
- Subject: Re: How does one set background color for entire line in textview? <- not possible
- Date: Tue, 16 Jan 2007 20:27:24 -0500
I've searched all over and I figure that this type of functionality is
not possible at the current time.
I'll just have to do without :-)
-- Tony
On Mon, 2007-01-15 at 15:06 -0500, Tony Freeman wrote:
Hello,
I have a function that takes the output of a spawned process and
displays that in a text buffer (part of a notebook widget). When the
spawned process is finished, I'd like to put some colorized text at the
bottom of the text buffer/view that alerts the user that the process is
done.
What I want is the entire line to have a background color of blue. The
code that I have so far just displays the blue background under the
text.
How do I make the entire line blue?
switch (status) {
case G_IO_STATUS_NORMAL:
return TRUE;
default:
/* Use a tag to make the DONE notification noticeable */
tag = gtk_text_buffer_create_tag (
buffer, "done_notification",
"foreground", "white",
"background", "blue",
"justification", GTK_JUSTIFY_CENTER,
"background-full-height", TRUE,
NULL);
start_byte = gtk_text_buffer_get_char_count(buffer);
gtk_text_buffer_insert(buffer, &iter,
"\n----------\nDONE\n----------\n", -1);
end_byte = gtk_text_buffer_get_char_count(buffer);
gtk_text_buffer_get_iter_at_offset (buffer,
&start, start_byte);
gtk_text_buffer_get_iter_at_offset (buffer,
&end, end_byte);
gtk_text_buffer_apply_tag (buffer, tag, &start, &end);
end_mark = gtk_text_buffer_create_mark(
buffer, "end_mark", &end, FALSE);
gtk_text_view_scroll_to_mark(textview, end_mark,
0.0, FALSE, 0.0, 0.0);
return FALSE;
}
-- Tony
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]