[Fwd: TextView right justification problem]



Hi,

no reply after five days on gtk-list, it seems to be right to send it to gtk-devel... :-)

-------- Original Message --------
Subject: TextView right justification problem
Date: Wed, 16 Apr 2003 14:04:24 +0200
From: Boszormenyi Zoltan <zboszor freemail hu>
To: gtk-list gnome org



Hi,

I am trying to use TextView, following the GTK2 API documentation:

 textview = GTK_TEXT_VIEW(lookup_widget(window1, "textview1"));
 buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
 gtk_text_buffer_set_text (buffer, "0,00", -1);
 tag = gtk_text_buffer_create_tag (buffer,
       "triplescale_rightjustify",
       "scale", 3.0,
       "justification", GTK_JUSTIFY_RIGHT,
       NULL);
 gtk_text_buffer_get_iter_at_offset (buffer, &start, 0);
 gtk_text_buffer_get_iter_at_offset (buffer, &end, -1);
 gtk_text_buffer_apply_tag (buffer, tag, &start, &end);

The text indeed is scaled by 3.0 but it is not right justified.
I can't get it right justified with "0,00", "0,00\n" or "\n0,00\n" strings.

The gtk-demo textview part contains code for right justification
but when I start to edit the start of the right justified line, it switches to left justification. When I edit it at the end of line of somewhere in the middle,
it does not change justification.

Best regards,
Zoltán Böszörményi


_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list









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