I'm making a gui in Glade and GTK in c language. I have two buttons 'start' and 'update'. Start button start the functionalities and update button update the values. I have made handlers for both and everything is working fine. But if I click on update button before clicking on start button, my program starts. I want that update button should funciton only after start button is clicked. for this I'll have to check condition of start button in update button handlers. How to do this?
Asked
Active
Viewed 628 times
-1
-
Can you show what you have so far? – tversteeg Mar 14 '15 at 12:13
1 Answers
1
Instead of checking the condition of the start button, I would suggest graying out the update button to begin with (gtk_widget_set_sensitive()
) and un-graying it in the start button's clicked
handler.

ptomato
- 56,175
- 13
- 112
- 165
-
-
its okay, and I have done that.. thankyou. Can you tell me how can I count the number of times a button is pressed. – Abhinav Rawat Mar 17 '15 at 09:33
-
You should open a new question for that. You'll get the best results if more people see the question, but no-one will find it here in the comments. – ptomato Mar 18 '15 at 06:45