[Home]GladeVCP Custom Widgets

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Showing revision 4
Here we attempt to describe how to build a custom glade widget using python. This is current as of June 2012 (under construction)

We will use a calculator widget that is already in linuxcnc (master)

We will start with a regular custom widget program that used glade to build the display but this widget is not included in the glade interface.

I found this calculator widget on the net: http://sraji.wordpress.com/2009/09/08/calculator-using-python-and-glade/
I changed the keys a a bit for my use : here is the source code: upload:custom_calculator.zip
I apologize - this program uses tabs instead of spaces -that sucks but thats what the original program used.
upload:calculator.png If you run this with: python newcalculatorglade.py It will display a calculator and pushing keys will change the display and pushing equals will do the math.


LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions | View current revision
Edited June 25, 2012 1:15 pm by Cmorley (diff)
Search:
Published under a Creative Commons License