Skip to content

Commit

Permalink
additional issue example
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisteach committed Mar 11, 2017
1 parent b895232 commit a7cd646
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions examples/issues/issuex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import sys
sys.path.append("../")
from appJar import gui

from appJar import gui

def addFileSettings(bn):
print(app.getEntry('sets'))
print(app.getSpinBox('set_options'))

app.openLabelFrame('Test')
for s in range(int(app.getEntry('sets'))):
for o in range(int(app.getSpinBox('set_options'))):
row = app.getRow()
app.addLabelOptionBox('Set {} Option {}'.format(s + 1, o + 1), ['--','OC','HS'], row, 0)
app.addNumericEntry('set_{}_{}'.format(s, o), row, 1)
app.setEntryDefault('set_{}_{}'.format(s, o), '.006')
app.setEntryWidth('set_{}_{}'.format(s, o), 9)
if s < int(app.getEntry('sets')) - 1:
app.addHorizontalSeparator(colour = None)
app.stopLabelFrame()

def addFileSettings2(bn):
app.startLabelFrame('Test2')
for s in range(int(app.getEntry('sets'))):
for o in range(int(app.getSpinBox('set_options'))):
row = app.getRow()
app.addLabelOptionBox('2Set {} Option {}'.format(s + 1, o + 1), ['--','OC','HS'], row, 0)
app.addNumericEntry('2set_{}_{}'.format(s, o), row, 1)
app.setEntryDefault('2set_{}_{}'.format(s, o), '.006')
app.setEntryWidth('2set_{}_{}'.format(s, o), 9)
if s < int(app.getEntry('sets')) - 1:
app.addHorizontalSeparator(colour = None)
app.stopLabelFrame()

app=gui()

app.addLabelEntry('sets')
app.startLabelFrame('Test')
app.addLabel('Options', 'Options per Set', 0, 0)
app.addSpinBoxRange('set_options', 1, 3, 0, 1)
app.setSpinBoxWidth('set_options', 10)
app.stopLabelFrame()

app.addButton('Next', addFileSettings)
app.addButton('Next2', addFileSettings2)
app.go()

0 comments on commit a7cd646

Please sign in to comment.