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


Python Window.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import __init__ [as 别名]
 def __init__( self ):
     Window.__init__( self, title='File/channel selection',
                      resizable=False )
     self.selection_frames = []
     self.last_selected_directory = DirRef('.')
     self.enter_button = Button(title='Plot',action=self.plot,width=200)
     self.add_frame()
开发者ID:ucsbdeepspace,项目名称:cofe-fts-ground-code-archive,代码行数:9,代码来源:psgui.py

示例2: __init__

# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import __init__ [as 别名]
  def __init__(self):
    columns = [Column(*t) for t in [
      ("Day", lambda t: t.date.day),
      ("i?", invoiceableSymbol),
      ("p?", paymentSymbol),
      ("Amount", lambda t: float(t.amount)),
      ("Memo", lambda t: str(t.memo)),
      ]]
    self.transactions_tbl = Table(columns=columns, scrolling='hv',
                                  multi_select=True)

    columns = [
      Column("Month", lambda (y, m): date(y, m, 1).strftime("%Y %b")),
      ]
    rows = D.withSession(Q.allTransactionMonths)
    self.months_tbl = Table(rows=rows, columns=columns, scrolling='v',
                            selection_changed_action=self.month_changed)

    Window.__init__(self, title="Statements", size=(1000, 500))
    self.place(self.months_tbl, left=0, right=100, top=0, bottom=0, sticky='nsw')
    self.place(self.transactions_tbl,
              left=self.months_tbl, right=0, top=0, bottom=0, sticky='nesw')
    self.menus = [
      Menu("Statements", [
          ("Select likely invoiceables/L", "select_likely_invoiceables"),
          ("Mark selection as invoiceable/I", "mark_selection_as_invoiceable"),
          ("Mark selection as payment/P", "mark_selection_as_payment"),
           ]),
           ]
开发者ID:georgevdd,项目名称:bank-account-reporting,代码行数:31,代码来源:UI.py

示例3: __init__

# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import __init__ [as 别名]
 def __init__(self, **kwds):
     Window.__init__(self, **kwds)
     view = TestScrollableView(container = self,
         size = (300, 300),
         extent = (1000, 1000),
         scrolling = 'hv',
         anchor = 'ltrb')
     button = Button("Embedded", action = self.click)
     off = (300, 300)
     view.scroll_offset = off
     button.position = off
     view.add(button)
     self.shrink_wrap()
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:15,代码来源:43-scroll-embedded.py

示例4: __init__

# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import __init__ [as 别名]
 def __init__(self):
     Window.__init__(self, size = (200, 200))
     self.filt = CheckBox("%ss only" % self.file_type.name)
     #self.multi = CheckBox("Multiple Selection")
     buts = []
     if 'request_old_file' in functions:
         buts.append(Button("Old File", action = self.do_old_file))
     if 'request_old_files' in functions:
         buts.append(Button("Old Files", action = self.do_old_files))
     if 'request_new_file' in functions:
         buts.append(Button("New File", action = self.do_new_file))
     if 'request_old_directory' in functions:
         buts.append(Button("Old Directory", action = self.do_old_dir))
     if 'request_old_directories' in functions:
         buts.append(Button("Old Directories", action = self.do_old_dirs))
     if 'request_new_directory' in functions:
         buts.append(Button("New Directory", action = self.do_new_dir))
     self.place_column([self.filt] + buts, left = 20, top = 20)
     self.shrink_wrap(padding = (20, 20))
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:21,代码来源:19-file_dialogs.py

示例5: __init__

# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import __init__ [as 别名]
 def __init__(self, **kwds):
     Window.__init__(self, **kwds)
     self.view = TestScrollableView(container = self,
         x = 20, y = 20,
         width = 300, height = 300)#, scrolling = 'hv')
     self.view.report_update_rect = True
     if 1: ###
         self.h_scrolling_ctrl = CheckBox("Horizontal Scrolling",
             value = 'h' in self.view.scrolling, 
             action = 'horz_scrolling')
         self.v_scrolling_ctrl = CheckBox("Vertical Scrolling",
             value = 'v' in self.view.scrolling,
             action = 'vert_scrolling')
         self.border_ctrl = CheckBox("Border", value = 1, action = 'change_border')
         CheckBox("Vertical Scrolling", value = 1, action = 'vert_scrolling'),
         buttons = self.create_buttons()
         x = self.view.right + 5
         y = self.view.top
         for b in buttons:
             b.position = (x, y)
             self.add(b)
             y = b.bottom + 5
         #self.shrink_wrap()
         self.view.become_target()
开发者ID:karlmatthew,项目名称:pygtk-craigslist,代码行数:26,代码来源:12-scroll.py

示例6: __init__

# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import __init__ [as 别名]
   def __init__( self,
                 controller,
                 logo_file,
                 **kwds ):
      """This method is the constructor for the class."""
      
      #self._win_has_menubar = False
      
      #call the parent constructor
      Window.__init__( self, size = ( 600, 400 ) )

      #set the title
      self.set_title( "Obscure Reference" )

      #center ourselves
      self.center( )

      #save the controller
      self._controller = controller

      #the navigation frame will take up the left quarter of the screen
      self._nav_width = self.width / 4
      
      #the main frame will take up the right remainder of the screen
      self._main_width = self.width - self._nav_width

      #create the bold font
      self._bold_font = Font( style = ["bold"] )

      self._Create_Navigation_Frame( )

      #create the main frame
      self._main_frame = \
         Frame( width = self._main_width,
                height = self.height )#- number_constants.menu_bar_height )
      
      
      #create the initial sub frame
      self._sub_frame = \
         Frame( width = (self._main_width - number_constants.basic_pad),
                height = self.height )

      self._logo_image = Image( logo_file )
      #self._intro_canvas = Canvas( None )
      #self._intro_canvas = View( )
      #self._intro_canvas = Frame( width = 500, height = 300 )

      #put the column on the GUI
      self._sub_frame.place_column( \
         [Label("Welcome to the Obscure Reference League",
                just = "center",
                width = (self._main_width - number_constants.basic_pad),
                font = self._bold_font ),
          #self._intro_canvas],          
          Label( "I would really like an image to be displayed here.")],
         left = 0,
         top = 0)
      self._main_frame.place( self._sub_frame )

      self.place( self._main_frame,
                  left = self._nav_frame.right,
                  top = 20,
                  sticky = "nsew" )
开发者ID:jakamph,项目名称:Obscure-Reference-Python,代码行数:65,代码来源:obscure_main_gui.py

示例7: __init__

# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import __init__ [as 别名]
 def __init__(self, *args, **kwargs):
     Window.__init__(self, *args, **kwargs)
开发者ID:stonewell,项目名称:pymterm,代码行数:4,代码来源:term_pygui.py

示例8: __init__

# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import __init__ [as 别名]
 def __init__(self, style="nonmodal_dialog", closable=0, zoomable=0, resizable=0, **kwds):
     if "title" not in kwds:
         kwds["title"] = Globals.application_name
     Window.__init__(self, style=style, closable=closable, zoomable=zoomable, resizable=resizable, **kwds)
开发者ID:rceballos98,项目名称:hapticJacket,代码行数:6,代码来源:GDialogs.py


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