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 am developing an application that has various buttons such as addition, multiplication and so on.. now when I click on addition button I want a dialog box to be displayed that has labels n text inputs (design part). I am facing a problem with linking that dialog box to the button.. Please tell me step by step how to initialize it and what should be written under this :

def on_addition_clicked(self, widget):

share|improve this question

1 Answer 1

up vote 1 down vote accepted

In addition to defining the functions to be called, you must connect the signal of the button.
The easiest way to do this is to define a dict with a mapping from the names to the handlers and then pass it to the Gtk.Builder.connect_signals() method. Read here for more help.

share|improve this answer
    
Thank U that link was helpful for me... –  user2511270 May 5 at 16:20
    
@user2511270 You're welcome. If this answered your question you may mark this answer as accepted –  girardengo May 5 at 16:54
    
Yeah sry forgot that –  user2511270 May 6 at 5:00

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.