reparent -> checkbutton and radiobutton dead



I'm creating my UI with glade (version 0.5.11, http://glade.pn.org/).
My program haves many different operation modes, and each mode haves
different UI. It would be handy to create UI for each of modes as new
window design. But users would prefer having just one window open, and
content of that window changed when mode is changed. 

One possible solution is create window, and reparent content of window
to main window. Here is how I'm doing it:

------------------
  dev_mainframe = NULL;
  win = create_subwin1(); // create subwindow
  
  if(win)  gtk_widget_show(win); // have to show it to get
                                 // map-callback of frame inside window

  if(dev_mainframe && deviceframe) {
    gtk_widget_hide(win);
    gtk_widget_reparent(dev_mainframe,deviceframe);
    gtk_widget_show(dev_mainframe);
    gtk_widget_destroy(win);
  }
------------------

It's working fine, desired content is moved where I wanted it, but one
problem: moved content is not working! It's drawed fine, and
everything looks like working, but all checkbuttons and radiobuttons
are totally dead, they don't react on mouse. And they are if
everything is kept in original window. Is this bug in gtk, or some
mistake I'm doing? For me it appears as bug, togglebuttons are working.

libgtk1.2 1.2.10, debian linux system , kernel 2.2.16, Xfree 4.0.3.

-- 
M. Tavasti /  tavastixx iki fi  /   +358-40-5078254
 Poista sähköpostiosoitteesta molemmat x-kirjaimet 
     Remove x-letters from my e-mail address




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