Re: how to justify text in a GtkTextView
- From: Paolo Costabel <paolo zebradevelopment com>
- To: "Boncek, John" <jboncek hunter com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: how to justify text in a GtkTextView
- Date: Mon, 31 Jan 2005 15:42:27 -0800
Hmm, works fine here. Are you doing something after insterting the text
that could affect the justification?
Boncek, John wrote:
Thanks for your suggestion, which I just tried. No difference.
-----Original Message-----
From: Paolo Costabel [mailto:paolo zebradevelopment com]
Sent: Monday, January 31, 2005 4:10 PM
To: Boncek, John
Cc: gtk-app-devel-list gnome org
Subject: Re: how to justify text in a GtkTextView
Do
gtk_text_buffer_set_text
after
gtk_text_view_set_justification
Boncek, John wrote:
I can't get text justification to work. Am I missing something? Here is
a code snippet:
// create TextView
GtkTextView * view;
GtkTextBuffer * buffer;
view = GTK_TEXT_VIEW(gtk_text_view_new());
buffer = gtk_text_view_get_buffer(view);
gtk_text_buffer_set_text (buffer, "some initial text", -1);
// GtkTextIter start;
// GtkTextIter end;
//
// gtk_text_buffer_get_start_iter(buffer, &(start));
// gtk_text_buffer_get_end_iter(buffer, &(end));
// gtk_text_buffer_remove_all_tags (buffer, &(start), &(end));
gtk_text_view_set_justification (view, GTK_JUSTIFY_CENTER);
The text window appears, displays the initial text, and accepts keyboard
input, etc. But it comes up left-justified regardless. I tried
GTK_JUSTIFY_RIGHT also. I also tried turning off any tags in case any
tags are created by default, as indicated in the currently-commented
section, since the documentation says the justification can be overridden
by a tag.
_______________________________________________
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]