GtkTextBuffer strange effect



align_center_tag is GtkTextTag with this property :
justification=GTK_JUSTIFY_CENTER

I apply this tag to the line of insert cursor with this (python code):

iter_start=text_buffer.get_iter_at_mark(text_buffer.get_mark("insert"))
iter_start=set_line_offset(0) # backwark to the start of line

iter_end=text_buffer.get_iter_at_mark(text_buffer.get_mark("insert"))
iter_end.forward_to_line_end()

text_buffer.apply_tag(align_center_tag, iter_start, iter_end)

After that, when I move the cursor to the end of line, this line change
justification to left. Why this ? I don't understand

Thanks for your help
Stéphane




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