From: Jussi S. <jus...@pp...> - 2006-10-06 08:45:17
|
I'll try to answer your question, though you never bothered to comment on my suggested "solution" to your earlier request concerning multilingual GUIs. Cullen Newsom wrote: > Anyone mind telling me how to get the name of a notebook page, from > <snip> > then from the created instance I would like to be able to do some thing > like: > on_initialize(self,event): > local_variable=my_page_name > > Thanks in advance, > > Cullen > > wxPython comes with the wxWidgets doc. Reading 5 minutes of the doc on wxNotebook, I've got this that seems to do the stuff: # self.GetParent() gives you the notebook nb = self.GetParent() # Print the current sheet label ie. name print nb.GetPageText(nb.GetSelection()) # Change it to something else # I know: you didn't ask, but I answer anyway nb.SetPageText(nb.GetSelection(), 'Characteristics of Raw Data') # Print it to be sure although the change show in the label print nb.GetPageText(nb.GetSelection()) Cheers, Jussi http://personal.inet.fi/cool/operator/ |