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


Python gtk.ScrolledWindow类代码示例

本文整理汇总了Python中gtk.ScrolledWindow的典型用法代码示例。如果您正苦于以下问题:Python ScrolledWindow类的具体用法?Python ScrolledWindow怎么用?Python ScrolledWindow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: __init__

 def __init__(self):
     ScrolledWindow.__init__(self)
     MDSplusWidget.__init__(self)
     tv = TextView()
     tv.set_wrap_mode(WRAP_WORD)
     self.buffer = tv.get_buffer()
     self.add(tv)
开发者ID:LucyScott,项目名称:mdsplus,代码行数:7,代码来源:mdsplusexpr.py

示例2: _setup_layout

    def _setup_layout(self):

        hpaned = HPaned()
        label = Label(_("Are you sure you want to install/remove those packages?"))
        label.show()
        inst_frame = Frame(_("Packages to install"))
        rem_frame = Frame(_("Packages to remove"))

        inst_scroll = ScrolledWindow()
        inst_scroll.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)

        rem_scroll = ScrolledWindow()
        rem_scroll.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)

        inst_scroll.add(self.install_tree)
        rem_scroll.add(self.remove_tree)
        
        inst_frame.add(inst_scroll)
        rem_frame.add(rem_scroll)

        hpaned.pack1(inst_frame, False, False)
        hpaned.pack2(rem_frame, False, False)
        
        hpaned.show_all()

        self.vbox.pack_start(label, False, False, 0)
        self.vbox.pack_start(hpaned, True, True, 0)
        self.set_default_size(600,300)
        return
开发者ID:BackupTheBerlios,项目名称:gtkpacman-svn,代码行数:29,代码来源:dialogs.py

示例3: __init__

class Dan:
	def __init__(self):
		self.url = "http://www.bibud.com"
		self.setupWindow()
		self.setupBrowser()
		main()
	def setupWindow(self):
		self.window_title = "Bibud"
		self.window = Window()
		self.window.show()
		self.window.connect("destroy-event", self.browser_quit)
		self.window.resize(1024,768)
		self.window.set_title(self.window_title)
	def setupBrowser(self):
		self.browser = WebView()
		self.browser.show()
		self.browser.open(self.url)
		self.scroller = ScrolledWindow()
		self.scroller.add(self.browser)
		self.window.add(self.scroller)
		self.browser.connect("title-changed", self.title_changed)
		self.scroller.show()
	def eTitleChanged(self, webview, frame, title):
		self.window.set_title(title)
	def eQuit(self):
		main_quit()
开发者ID:ColinKinloch,项目名称:projects,代码行数:26,代码来源:browser.py

示例4: _setup_layout

    def _setup_layout(self):

        self.set_default_size(600,200)
        label = Label(_("Are you sure you want to install/remove those packages?\n"))
        self.hpaned = HPaned()
        
        inst_scroll = ScrolledWindow()
        inst_scroll.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)

        rem_scroll = ScrolledWindow()
        rem_scroll.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
        
        inst_scroll.add(self.install_tree)
        rem_scroll.add(self.remove_tree)
        
        self.hpaned.pack1(inst_scroll, False, False)
        self.hpaned.pack2(rem_scroll, False, False)
    
        self.vbox.pack_start( label, False, False, 0 )
        self.vbox.pack_start( self.hpaned, True, True, 0 )
        self.vbox.pack_start( self.expander, False, False, 0 )
        
        self.show_all()
        self.expander.hide_all()
        self.close_button.hide()
开发者ID:BackupTheBerlios,项目名称:gtkpacman-svn,代码行数:25,代码来源:dialogs.py

示例5: __init__

 def __init__(self, conn):
     ScrolledWindow.__init__(self)
     self.conn = conn
     self.editor = TemplateEditor()
     self.menu = SimpleMenu()
     self.editor.connect('populate-popup', self.populate_menu, self.menu)
     self.add_with_viewport(self.editor)
     self.show()
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:8,代码来源:template.py

示例6: __init__

 def __init__(self):
     
     ScrolledWindow.__init__(self)
     
     self.set_policy(POLICY_NEVER, POLICY_ALWAYS)
     
     self.box = VBox()
     
     self.add_with_viewport(self.box)
开发者ID:LinusU,项目名称:geocache,代码行数:9,代码来源:GeoResult.py

示例7: __init__

 def __init__(self, data, name='RecordBox'):
     ScrolledWindow.__init__(self)
     self.set_name(name)
     self.vbox = VBox()
     self.add_with_viewport(self.vbox)
     HasRecordBox.__init__(self, self.vbox, data, name=name)
     self.vbox.show()
     self.show()
     self.vbox.set_events(BUTTON_PRESS_MASK)
开发者ID:BackupTheBerlios,项目名称:useless-svn,代码行数:9,代码来源:middle.py

示例8: ListWin

class ListWin(CommandBoxWindow, HasDialogs, HasListbox):
    def __init__(self):
        CommandBoxWindow.__init__(self)
        self.scroll = ScrolledWindow()
        self.vbox.add(self.scroll)
        self.scroll.show()
        if hasattr(self, 'menu'):
            HasListbox.__init__(self, self.scroll, rcmenu=self.menu)
        else:
            HasListbox.__init__(self, self.scroll)
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:10,代码来源:base.py

示例9: CList

class CList(Dialog, HasListbox):
    def __init__(self, message, name='MyCListDialog',
                 dnd=None, targets=[]):
        Dialog.__init__(self, message, name=name)
        self.set_name(name)
        self.scroll = ScrolledWindow()
        HasListbox.__init__(self, self.scroll, name=name,
                            dnd=dnd, targets=targets)
        self.scroll.show()
        self.vbox.pack_start(self.scroll, TRUE, TRUE, 0)
        self.set_size_request(150, 300)
开发者ID:BackupTheBerlios,项目名称:useless-svn,代码行数:11,代码来源:dialogs.py

示例10: __init__

 def __init__(self, text, font=None, name='TextScroll'):
     ScrolledWindow.__init__(self)
     self.set_name(name)
     self.tview = TextView()
     self.tview.set_name(name)
     self.tbuffer = self.tview.get_buffer()
     self.add(self.tview)
     self.tview.set_editable(0)
     self.tview.set_wrap_mode(WRAP_WORD)
     self.tbuffer.set_text(text)
     self.tview.show()
     self.show()
开发者ID:BackupTheBerlios,项目名称:useless-svn,代码行数:12,代码来源:simple.py

示例11: _ScrollBox

class _ScrollBox(Dialog):
    def __init__(self, message, name='MyScrollBox', type='v'):
        Dialog.__init__(self, message, name=name)
        self.scroll = ScrolledWindow()
        self.scroll.show()
        self.vbox.pack_start(self.scroll, TRUE, TRUE, 0)
        self.set_size_request(150, 300)
        if type =='v':
            self.mbox = VBox()
        else:
            self.mbox = HBox()
        self.scroll.add_with_viewport(self.mbox)
        self.mbox.show()
开发者ID:BackupTheBerlios,项目名称:useless-svn,代码行数:13,代码来源:dialogs.py

示例12: _TopListView

class _TopListView(VPaned, HasListbox, HasDialogs):
    def __init__(self, name='_LeftListView'):
        VPaned.__init__(self)
        self.set_name(name)
        self.scroll = ScrolledWindow()
        self.add1(self.scroll)
        self.scroll.show()
        if hasattr(self, 'menu'):
            HasListbox.__init__(self, self.scroll, rcmenu=self.menu)
        else:
            HasListbox.__init__(self, self.scroll)
        self.set_size_request(300,200)
        self.set_position(140)
        self.show()
开发者ID:BackupTheBerlios,项目名称:useless-svn,代码行数:14,代码来源:middle.py

示例13: __init__

 def __init__(self):
     ScrolledWindow.__init__(self)
     MDSplusWidget.__init__(self)
     self.numChannels=4
     self.nodesPerChannel=3
     self.dataNidOffset=1
     self.startIdxNidOffset=2
     self.endIdxNidOffset=3
     self.incNidOffset=-1
     self.table=Table(homogeneous=False)
     self.table.set_row_spacings(0)
     self.add_with_viewport(self.table)
     self.set_policy(POLICY_NEVER,POLICY_ALWAYS)
     adj=self.get_vadjustment()
     if adj is not None:
         adj.connect("changed",self.adj_changed)
开发者ID:LucyScott,项目名称:mdsplus,代码行数:16,代码来源:mdsplusdigchans.py

示例14: __init__

 def __init__(self,value=None):
     super(MDSplusRoutineWidget,self).__init__(rows=4,columns=2,homogeneous=False)
     self.image=Entry()
     self.routine=Entry()
     self.args=list()
     self.argTable=Table(rows=8,columns=2,homogeneous=False)
     for i in range(8):
         self.args.append(Entry())
         self.argTable.attach(Label("Arg %d:     " % (i+1,)),0,1,i,i+1,0,0)
         self.argTable.attach(self.args[i],1,2,i,i+1,EXPAND|FILL,0)
     self.scrolledWindow=ScrolledWindow()
     self.scrolledWindow.add_with_viewport(self.argTable)
     self.scrolledWindow.set_policy(POLICY_NEVER,POLICY_ALWAYS)
     adj=self.scrolledWindow.get_vadjustment()
     adj.connect("changed",adj_changed)
     self.timeout=Entry()
     self.attach(Label("Library:"),0,1,0,1,0,0)
     self.attach(self.image,1,2,0,1,EXPAND|FILL,0)
     self.attach(Label("Routine:"),0,1,1,2,0,0)
     self.attach(self.routine,1,2,1,2,EXPAND|FILL,0)
     self.attach(self.scrolledWindow,0,2,2,3)
     self.attach(Label("Timeout:"),0,1,3,4,0,0)
     self.attach(self.timeout,1,2,3,4,EXPAND|FILL,0)
     self.set_row_spacings(5)
     self.value=value
开发者ID:LucyScott,项目名称:mdsplus,代码行数:25,代码来源:mdsplusroutinewidget.py

示例15: _setup_layout

    def _setup_layout(self):
        self.vbox = VBox(False, 0)
        self.vbox.show()

        self.terminal = terminal()
        self.terminal.connect("child-exited", lambda _: self.close_button.show())
        
        self.expander = expander_new_with_mnemonic(_("_Terminal"))
        self.expander.set_expanded(False)
        self.expander.add(self.terminal)
        self.expander.show_all()
        
        self.close_button = Button(stock=STOCK_CLOSE)
        self.close_button.connect("clicked", lambda _: self.destroy())

        scr = ScrolledWindow()
        scr.set_policy ("automatic", "automatic")
        scr.add (self.tree)
        scr.show()

        vpaned = VPaned()
        vpaned.add1(scr)
        vpaned.add2(self.expander)
        vpaned.set_position (260)
        vpaned.show()

        self.vbox.pack_start(vpaned, True, True, 0)
        self.vbox.pack_start(self.close_button, False, False, 0)

        self.add(self.vbox)
        return
开发者ID:BackupTheBerlios,项目名称:gtkpacman-svn,代码行数:31,代码来源:dialogs.py


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