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.

Hey everyone (boy I seem to be posting quite a bit), I have a question regarding Glade and Quickly. Is it possible to map a button to a notebook within the same program. Like say for instance I have a toolbar with a button on it. Can I link it to, say page 3, on the notebook widget?

For instance, I have a button on my toolbar. While I know how to map it to external programs, I am uncertain as to how I would map it to page 3 (an example in this case). I don't want to open another window (already can do that), but I do not know how to link it to something already in the program.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Yes, it's possible to do. Use gtk.Notebook.set_current_page

For example:

def on_button1_clicked(self, widget):
    self.notebook1.set_current_page(2)
share|improve this answer
    
That was EXACTLY what I needed. Thanks man :D. I didn't know about the .set_current_page() part, so that's what was messing me up. –  Compt Jun 28 '12 at 16:33

Your Answer

 
discard

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.