Beruflich Dokumente
Kultur Dokumente
clr.AddReference('System.Windows.Forms')
clr.AddReference('System.Drawing')
from System.Drawing import Point, Color, Font
from System.Windows.Forms import *
def tolist(obj1):
if hasattr(obj1,"__iter__"): return obj1
else: return [obj1]
class CheckBoxForm(Form):
def __init__(self):
self.Text = "Altura de Niveles"
self.Width = 367
self.BackColor = Color.FromArgb(40,40,40)
self.output1 = []
self.output2 = []
self.ControlBox = False
self.TopMost = True
self.FormBorderStyle = FormBorderStyle.FixedDialog
self.StartPosition = FormStartPosition.CenterScreen
self.label = Label()
self.label.Text = IN[1]
self.label.Location = Point(5, 5)
self.label.ForeColor = Color.FromArgb(234,234,234)
self.label.Font = Font('Calibri', 10)
self.label.AutoSize = True
self.Controls.Add(self.label)
self.button1 = Button()
self.button1.Text = 'Aceptar'
self.button1.AutoSize = True
self.button1.ForeColor = Color.FromArgb(234,234,234)
self.button1.Font = Font('Calibri', 10)
self.button1.Click += self.save
self.Controls.Add(self.button1)
self.panel1 = Panel()
self.panel1.Location = Point(5, 31)
self.panel1.Width = 350
self.panel1.BackColor = Color.FromArgb(53,53,53)
self.panel1.ForeColor = Color.FromArgb(234,234,234)
self.Controls.Add(self.panel1)
l1 = tolist(IN[0])
names = None
form = CheckBoxForm()
y1 = 5
for i in xrange(len(l1)):
try:
if hasInd(names, i): val1 = names[i].ToString()
else: val1 = l1[i].ToString()
form.add_check(val1, y1)
y1 += 25
except: pass
form.btn_adjust(y1)
Application.Run(form)
OUT = form.output1
Application.Exit()