Beispiel #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)
Beispiel #2
0
    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
Beispiel #3
0
    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
Beispiel #4
0
 def __init__(self, parent = None):
     StackPanel.__init__(self, parent)
     self.orientation = 'Horizontal'
     self.autosize = True
Beispiel #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)
Beispiel #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'
Beispiel #7
0
 def __init__(self, parent=None):
     StackPanel.__init__(self, parent)
     self.orientation = 'Horizontal'
     self.bgColor = color.lightgray
     self.clip = False
     self.press = False
Beispiel #8
0
 def __init__(self, parent=None):
     StackPanel.__init__(self, parent)
     GroupBase.__init__(self)
     self.autosize = True
Beispiel #9
0
 def __init__(self, parent=None):
     StackPanel.__init__(self, parent)
     self.orientation = 'Horizontal'
     self.autosize = True
Beispiel #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)
Beispiel #11
0
 def __init__(self, parent = None):
     StackPanel.__init__(self, parent, autofix = False)
     self.orientation = 'Horizontal'
Beispiel #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)
Beispiel #13
0
 def __init__(self, parent=None):
     StackPanel.__init__(self, parent, autofix=False)
     self.orientation = 'Horizontal'
Beispiel #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'
Beispiel #15
0
 def __init__(self, parent=None):
     StackPanel.__init__(self, parent)
     self.orientation = "Horizontal"
     self.bgColor = color.lightgray
     self.clip = False
     self.press = False
Beispiel #16
0
 def __init__(self, parent=None):
     StackPanel.__init__(self, parent)
     GroupBase.__init__(self)
     self.autosize = True