Пример #1
0
    def OnGUI(self):
        GUI.BeginGUI(self)

        GUI.BeginTab('Tab_Main', True)
        GUI.BeginSubTab('Tab_Display', '展示')
        GUI.BeginGroup("字体")
        GUI.BeginVerticalLayout()
        GUI.BeginHorizontalLayout()
        GUI.Label('label_fontInfo1', '当前字体信息')
        GUI.Label('label_fontInfo2', '')
        GUI.Button('button_fontSetting', '字体设置')
        GUI.EndLayout()
        GUI.EndLayout()
        GUI.EndGroup()
        GUI.EndSubTab()

        GUI.BeginSubTab('', 'Tab2')

        GUI.BeginVerticalLayout()
        GUI.Label('label5', 'line 24')
        GUI.Label('label6', 'line 25')
        GUI.EndLayout()

        GUI.EndSubTab()

        GUI.EndTab()

        GUI.EndGUI()
Пример #2
0
    def OnGUI(self):
        GUI.BeginGUI(self)

        GUI.BeginHorizontalLayout()
        GUI.Button("button","按钮")
        GUI.EndLayout()

        GUI.BeginGroup("Group SpinBox Demo")
        GUI.BeginVerticalLayout()
        GUI.BeginHorizontalLayout()
        GUI.Label("label_1",'随便编辑1')
        GUI.DoubleSpinBox('spinBox1',min = -12.0,max = 20,step = 0.1)
        GUI.EndLayout()
        GUI.BeginHorizontalLayout()
        GUI.Label("label2",'随便编辑2')
        GUI.DoubleSpinBox('spinBox2',min = -10.0,max = 20,step = 0.5)
        GUI.EndLayout()
        GUI.EndLayout()
        GUI.EndGroup()

        GUI.BeginGroup("Group Tab Demo")
        GUI.BeginTab('Tab_Main',True)

        GUI.BeginSubTab('Tab111','Tab1')

        GUI.BeginVerticalLayout()
        GUI.Label('label3','line 1')
        GUI.Label('label4','line 2')
        GUI.EndLayout()

        GUI.EndSubTab()

        GUI.BeginSubTab('Tab222','Tab2')

        GUI.BeginVerticalLayout()
        GUI.Label('label5','line 24')
        GUI.Label('label6','line 25')
        GUI.EndLayout()

        GUI.EndSubTab()

        GUI.EndTab()
        GUI.EndGroup()

        GUI.EndGUI()