#NEWLINE# def __init__( self ) : #NEWLINE# #INDENT# window = gtk . Window ( gtk . WINDOW_TOPLEVEL ) #NEWLINE# window . set_title ( 'Layout Example' ) #NEWLINE# window . set_default_size ( 300 , 300 ) #NEWLINE# window . connect ( 'delete-event' , self . WindowDeleteEvent ) #NEWLINE# window . connect ( 'destroy' , self . WindowDestroy ) #NEWLINE# table = gtk . Table ( 2 , 2 , False ) #NEWLINE# window . add ( table ) #NEWLINE# self . layout = gtk . Layout ( None , None ) #NEWLINE# self . layout . set_size ( 600 , 600 ) #NEWLINE# table . attach ( self . layout , 0 , 1 , 0 , 1 , ( gtk . FILL | gtk . EXPAND ) , ( gtk . FILL | gtk . EXPAND ) , 0 , 0 ) #NEWLINE# vScrollbar = gtk . VScrollbar ( None ) #NEWLINE# table . attach ( vScrollbar , 1 , 2 , 0 , 1 , ( gtk . FILL | gtk . SHRINK ) , ( gtk . FILL | gtk . SHRINK ) , 0 , 0 ) #NEWLINE# hScrollbar = gtk . HScrollbar ( None ) #NEWLINE# table . attach ( hScrollbar , 0 , 1 , 1 , 2 , ( gtk . FILL | gtk . SHRINK ) , ( gtk . FILL | gtk . SHRINK ) , 0 , 0 ) #NEWLINE# vAdjust = self . layout . get_vadjustment ( ) #NEWLINE# vScrollbar . set_adjustment ( vAdjust ) #NEWLINE# hAdjust = self . layout . get_hadjustment ( ) #NEWLINE# hScrollbar . set_adjustment ( hAdjust ) #NEWLINE# button = gtk . Button ( 'Press Me' ) #NEWLINE# button . connect ( 'clicked' , self . ButtonClicked ) #NEWLINE# self . layout . put ( button , 0 , 0 ) #NEWLINE# button = gtk . Button ( 'Press Me' ) #NEWLINE# button . connect ( 'clicked' , self . ButtonClicked ) #NEWLINE# self . layout . put ( button , 100 , 0 ) #NEWLINE# button = gtk . Button ( 'Press Me' ) #NEWLINE# button . connect ( 'clicked' , self . ButtonClicked ) #NEWLINE# self . layout . put ( button , 200 , 0 ) #NEWLINE# window . show_all ( )