예제 #1
0
 def __init__(self, parent=None):
     StackPanel.__init__(self, parent)
     self.tabStop = False
     self.orientation = 'Horizontal'
     self.lastFocus = None
     self.bind('Child Visible Change',
               self.__onChildVisibleChange,
               postevent=False)
예제 #2
0
파일: menu.py 프로젝트: cashlalala/AudioBox
    def __init__(self, parent=None):
        StackPanel.__init__(self, parent)
        PopupBase.__init__(self)
        self.clip = False
        self.visible = False
        self.autosize = True
        self.autofit = True
        self.expandImg = ''
        self.upImg = ''
        self.downImg = ''
        self.expandMargin = 26, 1, 2, 2

        self.bind('Mouse Down', self.onMouseDown)
        self.bind('Mouse RDown', self.onMouseDown)
        self.bindCmd('Menu Return', self.modalRet)
        self.bind('Mouse Wheel', self.scroll)

        self.highLit = 'Empty'

        self.autoDirty(['sightRect', 'highLit'])
        self.subMenuIndent = 20
        self.subMenuOffsetIdx = 0
        # command routing
        self.cmdPath = None
예제 #3
0
파일: menu.py 프로젝트: cashlalala/AudioBox
    def __init__(self, parent=None):
        StackPanel.__init__(self, parent)
        PopupBase.__init__(self)
        self.clip = False
        self.visible = False
        self.autosize = True
        self.autofit = True
        self.expandImg = ""
        self.upImg = ""
        self.downImg = ""
        self.expandMargin = 26, 1, 2, 2

        self.bind("Mouse Down", self.onMouseDown)
        self.bind("Mouse RDown", self.onMouseDown)
        self.bindCmd("Menu Return", self.modalRet)
        self.bind("Mouse Wheel", self.scroll)

        self.highLit = "Empty"

        self.autoDirty(["sightRect", "highLit"])
        self.subMenuIndent = 20
        self.subMenuOffsetIdx = 0
        # command routing
        self.cmdPath = None
예제 #4
0
 def __init__(self, parent = None):
     StackPanel.__init__(self, parent)
     self.orientation = 'Horizontal'
     self.autosize = True
예제 #5
0
    from component import Component
    from random import randint
    import color

    koan.init()

    w = Window()
    w.create(0, 0, 800, 600, True)
    w.bgColor = color.black
    
    b = Captionbar(w)
    b.bindData('width', w, 'width', dir = '<-')
    b.height = 100
    b.bgColor = color.darkblue
    
    c = StackPanel(w)
    c.bgColor = color.darkgray
    c.size = 400, 300
    
    b = Caption(c)
    #b.bindData('width', c, 'width', dir = '<-')
    b.height = 50
    b.bgColor = color.lightgray
    
    # toolbar
    b = Toolbar(c)
    b.autosize = False
    b.height = 100
    b.bgColor = color.darkblue
    
    o = Component(b)
예제 #6
0
    def onDraw(self, render):
        super(Combobox, self).onDraw(render)
        TextBase.onDraw(self, render)


if __name__ == '__main__':
    from window import Window
    from panel import StackPanel

    koan.init()

    w = Window()
    w.create(0, 0, 400, 600, True)
    w.bgColor = color.darkgray

    p = StackPanel(w)
    p.bindData('width', w, 'width', dir='<-')
    p.bindData('height', w, 'height', dir='<-')

    # button
    b = Button(p)
    b.tips = 'Button'
    b.bgColor = color.darkblue
    b.height = 30

    # text button
    tb = TextButton(p)
    tb.bgColor = color.darkred
    tb.fontColor = color.white
    tb.height = 30
    tb.text = 'TextButton'
예제 #7
0
파일: menu.py 프로젝트: cashlalala/AudioBox
 def __init__(self, parent=None):
     StackPanel.__init__(self, parent)
     self.orientation = 'Horizontal'
     self.bgColor = color.lightgray
     self.clip = False
     self.press = False
예제 #8
0
파일: menu.py 프로젝트: cashlalala/AudioBox
 def __init__(self, parent=None):
     StackPanel.__init__(self, parent)
     GroupBase.__init__(self)
     self.autosize = True
예제 #9
0
 def __init__(self, parent=None):
     StackPanel.__init__(self, parent)
     self.orientation = 'Horizontal'
     self.autosize = True
예제 #10
0
    from component import Component
    from random import randint
    import color

    koan.init()

    w = Window()
    w.create(0, 0, 800, 600, True)
    w.bgColor = color.black

    b = Captionbar(w)
    b.bindData('width', w, 'width', dir='<-')
    b.height = 100
    b.bgColor = color.darkblue

    c = StackPanel(w)
    c.bgColor = color.darkgray
    c.size = 400, 300

    b = Caption(c)
    #b.bindData('width', c, 'width', dir = '<-')
    b.height = 50
    b.bgColor = color.lightgray

    # toolbar
    b = Toolbar(c)
    b.autosize = False
    b.height = 100
    b.bgColor = color.darkblue

    o = Component(b)
예제 #11
0
 def __init__(self, parent = None):
     StackPanel.__init__(self, parent, autofix = False)
     self.orientation = 'Horizontal'
예제 #12
0
 def __init__(self, parent = None):
     StackPanel.__init__(self, parent)
     self.tabStop = False
     self.orientation = 'Horizontal'
     self.lastFocus = None
     self.bind('Child Visible Change', self.__onChildVisibleChange, postevent = False)
예제 #13
0
 def __init__(self, parent=None):
     StackPanel.__init__(self, parent, autofix=False)
     self.orientation = 'Horizontal'
예제 #14
0
    def onDraw(self, render):
        super(Combobox, self).onDraw(render)
        TextBase.onDraw(self, render)


if __name__ == '__main__':
    from window import Window
    from panel import StackPanel
    
    koan.init()
    
    w = Window()
    w.create(0, 0, 400, 600, True)
    w.bgColor = color.darkgray
    
    p = StackPanel(w)
    p.bindData('width', w, 'width', dir = '<-')
    p.bindData('height', w, 'height', dir = '<-')
    
    # button
    b = Button(p)
    b.tips = 'Button'
    b.bgColor = color.darkblue
    b.height = 30

    # text button
    tb = TextButton(p)
    tb.bgColor = color.darkred
    tb.fontColor = color.white
    tb.height = 30
    tb.text = 'TextButton'
예제 #15
0
파일: menu.py 프로젝트: cashlalala/AudioBox
 def __init__(self, parent=None):
     StackPanel.__init__(self, parent)
     self.orientation = "Horizontal"
     self.bgColor = color.lightgray
     self.clip = False
     self.press = False
예제 #16
0
파일: menu.py 프로젝트: cashlalala/AudioBox
 def __init__(self, parent=None):
     StackPanel.__init__(self, parent)
     GroupBase.__init__(self)
     self.autosize = True