[pygtk] Window waits to complete code brfore show
Miki
daily.cron at gmail.com
Thu Mar 1 16:13:41 WST 2007
Hi,
I upload the screens shots and the py code here:
http://webportal.israel.net/pygtk/black.html
http://webportal.israel.net/pygtk/black.py
Thanks for all.
Miki
On 3/1/07, Miki <daily.cron at gmail.com> wrote:
>
> Hi again,
> I used your solutions but it doesn't solve my issue completely.
> I wrote a program like a wizard, I'm running the first window and all ok,
> then I have a "Next" button, that hide the first window and running a
> function that create the next window.
> The function is creating the all widget (image, labels, buttonbox and
> progressbar), the I issue window.show_all() and then I'm using another
> python commands (to call the ping function), in this function I added thi=
s:
>
> while gtk.events_pending():
> gtk.main_iteration()
>
> and I also try to add this pending before calling the "PING" function but
> got the same result.
>
> The result is I'm getting the window with no widgets (buttons, image,
> labels) only a white window with the progressbar shadow in gray, when the
> "PING" function ends the widgets is shown.
>
> I try this with the time.sleep(5) function and got the same results.
>
> Any ideas?
>
> Thanks,
> Miki
>
>
> On 2/27/07, Volker Helm < Helm.volker at gmx.de> wrote:
> >
> > Hi Miki,
> >
> > just put the gtk code into a class as seen here:
> >
> > http://www.pygtk.org/pygtk2tutorial/ch-GettingStarted.html#sec-HelloWor=
ld
> >
> > put the rest of the code into another class or function, so you can call
> > it from the first gtk class.
> >
> > Then it will show first the window with the label, after it you call
> >
> > ...
> > import pygtk
> > ...
> > class gtkping(object):
> > def delete_event(self, widget, event, data=3DNone):
> > return False
> >
> > def __init__(self):
> > w =3D gtk.Window()
> > w.connect("delete_event", self.delete_event)
> > l =3D gtk.Label("pppp")
> > w.add(l)
> > w.show_all()
> > #now you can call your ping functions
> >
> > def main(self):
> > gtk.main()
> >
> > def ping...
> >
> >
> > if __name__ =3D=3D "__main__":
> > test =3D gtkping()
> > test.main()
> >
> > --
> > "Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
> > Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out
> > _______________________________________________
> > pygtk mailing list pygtk at daa.com.au
> > http://www.daa.com.au/mailman/listinfo/pygtk
> > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20070301/90efebbf/at=
tachment.htm
More information about the pygtk
mailing list