Example #1
0
def run():
	setupTestTheme(800, 600)

	cd = FileDialog("C:", onDialogOk)

	pyui2.run()
	pyui2.quit()
Example #2
0
def run():
	setupTestTheme(800, 600)

	cd = Console(50, 50, 400, 200)

	pyui2.run()
	pyui2.quit()
Example #3
0
def run():
	setupTestTheme(800, 600)

	cd = ColorDialog(onDialogOk)

	pyui2.run()
	pyui2.quit()
Example #4
0
def run():
	setupTestTheme(800, 600)

	w = pyui2.widgets.Frame(50, 50, 400, 400, "Captionless Frame", [pyui2.widgets.Frame.NO_CAPTION])
	w.pack()

	pyui2.run()
	pyui2.quit()
Example #5
0
def run():
	setupTestTheme(800, 600)

	w = pyui2.widgets.Frame(50, 50, 400, 400, "Simple Frame")
	w.pack()

	pyui2.run()
	pyui2.quit()
Example #6
0
def run():
    setupTestTheme(800, 600)

    w = pyui2.widgets.Frame(50, 50, 400, 400, "Simple Frame")
    w.addChild(pyui2.widgets.Label("Label 1", None, None, 1))
    w.addChild(pyui2.widgets.Label("Label 2"))
    w.addChild(pyui2.widgets.Label("Label 3"))
    w.pack()

    pyui2.run()
    pyui2.quit()
Example #7
0
def run():
	setupTestTheme(800, 600)

	w = pyui2.widgets.Frame(50, 50, 400, 400, "Button Test")
	w.addChild(pyui2.widgets.Button("Button 1", onButton1))
	w.addChild(pyui2.widgets.Button("Button 2", onButton2))
	w.addChild(pyui2.widgets.Button("Button 3", onButton3))
	w.pack()

	pyui2.run()
	pyui2.quit()
Example #8
0
def run():
	setupTestTheme(800, 600)

	w = pyui2.widgets.Frame(50, 50, 400, 400, "Simple Frame")
	w.addChild(pyui2.widgets.CheckBox("CheckBox 1", onCheckBox1))
	w.addChild(pyui2.widgets.CheckBox("CheckBox 2", onCheckBox2))
	w.addChild(pyui2.widgets.CheckBox("CheckBox 3", onCheckBox3, 1))
	w.pack()

	pyui2.run()
	pyui2.quit()
Example #9
0
def run():
    setupTestTheme(800, 600)

    READWRITE = 0
    READONLY = 1

    w = pyui2.widgets.Frame(50, 50, 400, 400, "Edit Test")
    w.addChild(pyui2.widgets.Edit("Edit 1", 5, onEdit1, READONLY))
    w.addChild(pyui2.widgets.Edit("some text for this edit", 10, onEdit2, READWRITE))
    w.addChild(pyui2.widgets.Edit("Another lot of text", 7, onEdit3))
    w.pack()

    pyui2.run()
    pyui2.quit()
Example #10
0
	def run(self):
		setupTestTheme(800, 600)
	
		w = pyui2.widgets.Frame(50, 50, 400, 400, "ImageButton test")
		self.btn1 = pyui2.widgets.ImageButton("cursor_drag.png", self.onButton1)
		self.btn2 = pyui2.widgets.ImageButton("cursor_hand.png", self.onButton2)
		self.btn3 = pyui2.widgets.ImageButton("cursor_resize.png", self.onButton3, "", "cursor_pointer.png")
		w.addChild(self.btn1)
		w.addChild(self.btn2)
		w.addChild(self.btn3)
		w.pack()
	
		pyui2.run()
		pyui2.quit()
Example #11
0
def run():
	setupTestTheme(800, 600)

	list1 = [("Item 1", None), ("Item 2", None), ("Item 3", None)]
	list2 = [("Apples", None), ("Oranges", None), ("Bananas", None), ("Plums", None)]
	list3 = [("Star Trek", "Good"), ("Stargate: SG1", "Great"), ("Babylon 5", "The Greatest")]

	w = pyui2.widgets.Frame(50, 50, 400, 400, "Dropdown Box Test")
	w.addChild(pyui2.widgets.DropDownBox(3, onList1, list1))
	w.addChild(pyui2.widgets.DropDownBox(3, onList2, list2, 1))
	w.addChild(pyui2.widgets.DropDownBox(3, onList3, list3, 2))
	w.pack()

	pyui2.run()
	pyui2.quit()
Example #12
0
def run():
	setupTestTheme(800, 600)

	w = pyui2.widgets.Frame(50, 50, 400, 400, "Simple Frame")

	items = ["Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6"]
	lb = pyui2.widgets.ListBox()
	lb.populateList(items)
	w.addChild(lb)


	w.pack()

	pyui2.run()
	pyui2.quit()
Example #13
0
def run():
	setupTestTheme(800, 600)

	w = pyui2.widgets.Frame(50, 50, 400, 400, "Picture Test")
	
	w.addChild(pyui2.widgets.Picture("cursor_drag.png"))

	p2 = pyui2.widgets.Picture("cursor_drag.png")
	p2.setRotation(45)
	w.addChild(p2)

	w.pack()

	pyui2.run()
	pyui2.quit()