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)
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
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
def __init__(self, parent = None): StackPanel.__init__(self, parent) self.orientation = 'Horizontal' self.autosize = True
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)
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'
def __init__(self, parent=None): StackPanel.__init__(self, parent) self.orientation = 'Horizontal' self.bgColor = color.lightgray self.clip = False self.press = False
def __init__(self, parent=None): StackPanel.__init__(self, parent) GroupBase.__init__(self) self.autosize = True
def __init__(self, parent=None): StackPanel.__init__(self, parent) self.orientation = 'Horizontal' self.autosize = True
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)
def __init__(self, parent = None): StackPanel.__init__(self, parent, autofix = False) self.orientation = 'Horizontal'
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)
def __init__(self, parent=None): StackPanel.__init__(self, parent, autofix=False) self.orientation = 'Horizontal'
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'
def __init__(self, parent=None): StackPanel.__init__(self, parent) self.orientation = "Horizontal" self.bgColor = color.lightgray self.clip = False self.press = False