source: orange/Orange/doc/extend-widgets/gui_label.py @ 9671:a7b056375472

Revision 9671:a7b056375472, 767 bytes checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

Line 
1from OWWidget import *
2import OWGUI
3
4class Test(OWWidget):
5    settingsList = ["val", "line"]
6    def __init__(self, parent=None):
7        OWWidget.__init__(self, parent, title='Labels')
8
9        self.val = 5
10        self.line = "a parrot"
11
12        OWGUI.spin(self.controlArea, self, "val", 1, 10, label="Value")
13        OWGUI.lineEdit(self.controlArea, self, "line", label="Line: ", orientation="horizontal")
14
15        OWGUI.label(self.controlArea, self, "Value is %(val)i and line edit contains %(line)s")       
16
17        self.resize(100,100)
18
19##############################################################################
20# Test the widget, run from prompt
21
22if __name__=="__main__":
23    appl = QApplication(sys.argv)
24    ow = Test()
25    ow.show()
26    appl.exec_()
Note: See TracBrowser for help on using the repository browser.