Edward Muller wrote:
> 
> I can't seem to get the text in the label to wrap in the following code. 
> I've played around with moving the set_line_wrap call around a little and 
> a few other things with no results. Any ideas?
[snip]
I have generally found that it is far easier to use a text box.

        text = "Text to go in the widget"
        l = GtkText()
        s = l.get_style().copy()
        # Change all the colours to black on white.
        for i in range(0,5):
            s.fg[i] = s.black
            s.bg[i] = s.white  
        l.set_style(s)
        l.set_line_wrap(1)
        l.set_word_wrap(1)
        l.set_editable(0)
        l.insert(s.font, s.black, s.white, text)
        v.pack_start(l)

-- 
Michael JasonSmith        http://www.cosc.canterbury.ac.nz/~mpj17/

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to