Nevermind...I figured it out...set the usize of the label and it will work

Anyway. So is there a way I can get the text in the wrapped label to be 
centered?

On Tuesday 09 January 2001 10:59 pm, 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?
>
> from gtk import *
> from GTK import *
>
> class MsgBox(GtkWindow):
>     def __init__(self,lbl_text):
>         GtkWindow.__init__(self)
>         self.set_usize(120,160)
>         self.set_uposition(60,80)
>         frame = GtkFrame()
>         frame.set_shadow_type(SHADOW_ETCHED_IN)
>         self.add(frame)
>         frame.show()
>         box = GtkVBox()
>         frame.add(box)
>         lbl = GtkLabel()
>         lbl.show()
>         box.pack_start(lbl,expand=TRUE,fill=TRUE)
>         lbl.set_line_wrap(TRUE)
>         lbl.set_text(lbl_text)
>         self.close = GtkButton('Okay')
>         self.close.show()
>         box.pack_start(self.close,expand=FALSE)
>         box.show()
>         self.close.connect('clicked',self.close_me)
>         self.set_modal(TRUE)
>
>     def close_me(self,btn):
>         self.hide()
>         del self

-- 
Edward Muller - [EMAIL PROTECTED] - [EMAIL PROTECTED]
The way revolutions are completed is only by the death of the previous 
adherents to the paradigm

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

Reply via email to