Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a Notebook element and TextView elements inside them. Because the pages on the notebook will be constantly switched between. I need to be able to have in a variable the currently selected TextView's buffer. How would I do this?

share|improve this question
Although Sam has answered your question correctly, your question is more suitable at stackoverflow.com –  Nickolas Jun 22 '12 at 18:34
@Nick, Why is it not appropriate here? AskUbuntu is suggested at developer.ubuntu.com (and informally elsewhere) as a source of help for Ubuntu app developers. –  monotasker Aug 9 '12 at 13:29
You are correct. –  Nickolas Aug 9 '12 at 13:54

1 Answer 1

up vote 3 down vote accepted

You can use

pageNum = notebook.get_current_page()

which will give you the current page number. and use

textview = notebook.get_nth_page(pageNum)

to get the widget on that page.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.