[Mono-list] notebook signals troubles

Adam Tauno Williams adamtaunowilliams at gmail.com
Thu May 22 08:57:28 EDT 2008


> > So, the solution to this is to NOT drop that custom widget into tab C, but
> > instead wait until tab C is clicked, and THEN do something like this:
> >
> >        if (Frame_C.Child != null)
> >                Frame_C.Remove(Frame_C.Child);
> >        MyProgram.Roster myRoster = new MyProgram.Roster();
> >        Frame_C.Add(myRoster);
> >        Frame_C.ShowAll();
> > So I look at the signals available for the notebook widget -- FocusTab,
> > ChangeCurrentTab, MoveFocusOut, SwitchPage, and SelectPage.  I think maybe
> > SelectPage is the one I want.  Please correct me.
> > Now, here's my big question:  Once a handler is declared for the correct
> > signal, how does that handler determine which tab was selected?
> A much better idea would be to also have a global event that gets
> fired when you change the online variable.  C can pick up on that and
> modify its behavior accordingly.  (Or you could have that event create
> C, but that would be less preferable IMO.)

Agree;  we do that in Consonance <http://code.google.com/p/consonance/>,
where the main of the interface is in a notebook.   When created the
notebook hides its tabs and displays the first page (a splash page, so
to speak).  When it gets the signal to go to Online mode it displays the
tabs and removes the first page.



More information about the Mono-list mailing list