pyxforms/samples/demo1.py

35 lines
431 B
Python
Executable File

#!/usr/local/bin/python
from Pyxform import *
#
# Init the library (sucks but works)
#
xfinit("Something", "1", sys.argv[0])
#
# Create a "Window" - A form in XForms parlance
win = Form()
#
# Show it
win.Show()
#
# Create a button
a_button = Button(0, 10, 10, 100, 30, "Press Me")
#
# Put it inside win
win.Add(a_button)
#
# Start the event loop
# It will run forever, because the button doesn't do anything
runforms()