[Glade-users] Problem



On Sat, 22 Jul 2006 23:00:48 -0400
max <mota.vnz at gmail.com> wrote:

Hi, Sorry per my bad English but isn't my native language.
I have a problem, i have a program that was make in python and glade-2
and it have a problem, when i press a bottom the first time it open a
new window and work perfect. But if i press the same bottom a second
time i have a bug. I am not secure that is a bug but the problem is
that when i press the bottom the second time the window are void,
similar when i create a new windows in glade. The windows don't have
nothing if it's opened a second time. I guess that is a problem of
code that i generate with glade, :-S

When you create the windows with Glade, they are automatically generated
in the 'main' file. If you destroy the window when closing it, you will
have to do a create_YourWindow again, before showing it, else it doesn't
exist anymore.

There are two options:

   When closing the window, use 'gtk_widget_hide'   (Then you'll be able
   to gtk_widget_show the next time)

   Remove the create_YourWindow from main, and do a
     create_YourWindow, and then gtk_widget_destroy each time you want
     to show/hide.

I think that is the cause of your problems... Not sure though.

John




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