Esempio n. 1
0
def create_scrolledwindow_view ():
    table = Table (2, 2)
    table.spacing = 5
    
    # Create and display a simple ScrolledWindow.
    window = ScrolledWindow (200, 200)
    window.child = label.create_label_view ()
    table.add_child (0, 0, window)
    
    # Create and display a simple ScrolledWindow with always scrolling.
    always = ScrolledWindow (200, 200)
    always.scrolling = SCROLL_ALWAYS
    always.child = label.create_label_view ()
    table.add_child (0, 1, always)
    
    # Create and display a simple ScrolledWindow with no scrolling.
    never = ScrolledWindow (200, 200)
    never.scrolling = SCROLL_NEVER
    never.child = label.create_label_view ()
    table.add_child (1, 0, never)

    # Create an insensitive ScrolledWindow
    insensitive = ScrolledWindow (200, 200)
    insensitive.scrolling = SCROLL_ALWAYS
    insensitive.sensitive = False
    insensitive.child = label.create_label_view ()
    table.add_child (1, 1, insensitive)

    return table
Esempio n. 2
0
 def label_selected (self):
     self.frame.add_child (label.create_label_view ())