当前位置: 首页>>代码示例>>Python>>正文


Python Component.size方法代码示例

本文整理汇总了Python中component.Component.size方法的典型用法代码示例。如果您正苦于以下问题:Python Component.size方法的具体用法?Python Component.size怎么用?Python Component.size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在component.Component的用法示例。


在下文中一共展示了Component.size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: TestStackPanel

# 需要导入模块: from component import Component [as 别名]
# 或者: from component.Component import size [as 别名]
    def TestStackPanel(w):
        s = StackPanel(w)
        #s.orientation = 'Horizontal'
        s.center = True        
        s.bind('Mouse Wheel', s.onScroll)
        #s.autosize = True
        s.rect = 50, 50, 600, 170
        s.bgColor = color.gray

        c = Component(s)
        c.size = 250, 50
        c.bgColor = color.red
        
        c = Component(s)
        c.size = 300, 50
        c.bgColor = color.green
        
        c = Component(s)
        c.size = 300, 300
        c.bgColor = color.blue
开发者ID:cashlalala,项目名称:AudioBox,代码行数:22,代码来源:panel.py

示例2: Caption

# 需要导入模块: from component import Component [as 别名]
# 或者: from component.Component import size [as 别名]
 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)
 o.size = 64, 64
 o.bgColor = (255, randint(0,255), randint(0,255), randint(0,255))
 o = Component(b)
 o.size = 64, 64
 o.bgColor = (255, randint(0,255), randint(0,255), randint(0,255))
 o = Component(b)
 o.size = 64, 64
 o.bgColor = (255, randint(0,255), randint(0,255), randint(0,255))
 
 # autohide toolbar    
 b = AutoHideToolbar(c)
 b.autosize = False
 b.height = 100
 b.bgColor = color.darkblue
 
 o = Component(b)
开发者ID:cashlalala,项目名称:AudioBox,代码行数:33,代码来源:toolbar.py

示例3: TestDockPanel

# 需要导入模块: from component import Component [as 别名]
# 或者: from component.Component import size [as 别名]
 def TestDockPanel(w):    
     d = DockPanel(w)
     d.bindData('width', w, 'width', dir = '<-')
     d.bindData('height', w, 'height', dir = '<-')
     
     s = StackPanel(d)
     s.bgColor = color.red
     s.width = 100
     
     p = DockSplitter(d)
     p.bgColor = color.darkgray
     
     s1 = StackPanel(d)
     s1.bgColor = color.green
     s1.height = 100    
     #d.dock(s1, 'top')
     
     p = DockSplitter(d)
     p.bgColor = color.darkgray
     
     s2 = StackPanel(d)
     s2.bgColor = color.blue
     s2.width = 100
     #d.dock(s2, 'right')
     
     p = DockSplitter(d)
     p.bgColor = color.darkgray
     
     s3 = StackPanel(d)
     s3.bgColor = color.yellow
     s3.height = 100
     #d.dock(s3, 'bottom')
     
     p = DockSplitter(d)
     p.bgColor = color.darkgray
     
     
     d.dock(s, 'left')
     d.dock(s1, 'top')
     d.dock(s2, 'right')
     d.dock(s3, 'bottom')
     
     d = DockPanel(d)
     
     s = StackPanel(d)
     s.bgColor = color.red
     s.width = 100
     
     p = DockSplitter(d)
     p.bgColor = color.darkgray
     
     s1 = StackPanel(d)
     s1.bgColor = color.green
     s1.height = 100    
     #d.dock(s1, 'top')
     
     p = DockSplitter(d)
     p.bgColor = color.darkgray
     
     s2 = StackPanel(d)
     s2.bgColor = color.blue
     s2.width = 100
     #d.dock(s2, 'right')
     
     p = DockSplitter(d)
     p.bgColor = color.darkgray
     
     s3 = StackPanel(d)
     s3.bgColor = color.yellow
     s3.height = 100
     #d.dock(s3, 'bottom')
     
     p = DockSplitter(d)
     p.bgColor = color.darkgray
     
     
     c = Canvas(d)
     c.bgColor = color.white
     #d.dock(c, 'left')
     
     o = Component(c)
     o.bgColor = color.darkblue    
     o.size = 200, 30
     
     o1 = Component(c)
     o1.bgColor = color.red    
     o1.size = 50, 50
     
     o2 = Component(c)
     o2.bgColor = color.green    
     o2.size = 50, 50
     
     o3 = Component(c)
     o3.bgColor = color.blue    
     o3.size = 50, 50
     
     o4 = Component(c)
     o4.bgColor = color.purple    
     o4.size = 50, 50
 
#.........这里部分代码省略.........
开发者ID:cashlalala,项目名称:AudioBox,代码行数:103,代码来源:panel.py


注:本文中的component.Component.size方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。