[Mono-list] notebook signals troubles

David Griffith dgriffi at cs.csubak.edu
Wed May 7 04:50:55 EDT 2008


I have a notebook widget set up with tabs labeled A, B, C, and D.  From
within Monodevelop I dropped a custom widget into tab C that needs to know
if we're logged into the database.  This is handled by some business in
tab D, which sets a global variable (like this: MyProgram.Global.online =
true;).  My problem is that the widget dropped into tab C starts up as
soon as the application starts up, which means it always checks the online
variable before the user has a chance to get to the database login widget
in tab D.

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?



-- 
David Griffith
dgriffi at cs.csubak.edu


More information about the Mono-list mailing list