Archive for October, 2005

Making a button inactive using PYGTK + GLADE

Sunday, October 2nd, 2005

I have been working on a little app in my spare time. It is for calculating your GPA. Its nothing special, I have even made a similar app in Java as an assignment in class. This app has (at the time of this writting) only 3 buttons. An “add” button, a “calculate” button, and a “quit” button. I decided I wanted to make it so once you hit calculate you could not press add or calculate again, this will prevent you from adding the same info to the display once it has been calculated (with out selecting something from the file menu to reset the form). I searched all over the net and couldnt find anything on how to make this happen but some of the wonderful people in #pygtk were able to help me so I thought I would pass that info along for anyone else.

I made a really simple example to show how this is done with pygtk and glade2. You can d/l the example here. If you have any questions, comments, or suggestions on how I could/should/needed to do this please feel free to comment. I do have moderation enabled for comments so it might take a day or so for it to show but I will allow (and will be open to) any comments that are not spam.