Exemplo n.º 1
0
 def __init__(self, text=''):
     Element.__init__(self, gtk.ScrolledWindow())
     self.textview = gtk.TextView()
     self.buffer = self.textview.get_buffer()
     self.buffer.insert_at_cursor(text)
     self.child.set_shadow_type(gtk.SHADOW_IN)
     self.child.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
     self.child.add(self.textview)
Exemplo n.º 2
0
 def __init__(self, text = ''):
     Element.__init__(self, gtk.ScrolledWindow())
     self.textview = gtk.TextView()
     self.buffer   = self.textview.get_buffer()
     self.buffer.insert_at_cursor(text)
     self.child.set_shadow_type(gtk.SHADOW_IN)
     self.child.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
     self.child.add(self.textview)
Exemplo n.º 3
0
 def __init__(self, rows=2, cols=2):
     Element.__init__(self, gtk.Table(rows, cols))
     self.layout = Layout(0, 0)
     self.entry_rows = None
     self.entry_cols = None
     self.targets = {}
     self.child.set_row_spacings(3)
     self.child.set_col_spacings(3)
     self._resize_table(rows, cols)
Exemplo n.º 4
0
 def __init__(self, rows = 2, cols = 2):
     Element.__init__(self, gtk.Table(rows, cols))
     self.layout     = Layout(0, 0)
     self.entry_rows = None
     self.entry_cols = None
     self.targets    = {}
     self.child.set_row_spacings(3)
     self.child.set_col_spacings(3)
     self._resize_table(rows, cols)
Exemplo n.º 5
0
 def __init__(self, *args):
     Element.__init__(self, gtk.Button(*args))
     self.entry = gtk.Entry()
     align      = gtk.Alignment(.5, .5, 0, 0)
     align.add(self.entry)
     self.child.add(align)
     self.entry.set_has_frame(False)
     self.entry.connect('realize',              self._on_entry_realize)
     self.entry.connect('changed',              self._on_entry_changed)
     self.child.connect('focus-in-event',       self._on_button_focus)
     self.child.connect('button-press-event',   self._forward_event_to_parent)
     self.child.connect('button-press-event',   self._forward_event_to_entry)
     self.child.connect('button-release-event', self._forward_event_to_parent)
     if len(args) == 0:
         self.entry.set_text('Button')
 def __init__(self, options=None):
     Element.__init__(self, gtk.ComboBox())
     self.options = []
     for option in options or []:
         self.add_option(option)
Exemplo n.º 7
0
 def __init__(self, text = ''):
     Element.__init__(self, gtk.Entry())
     self.child.set_text(text)
 def __init__(self, text=''):
     Element.__init__(self, gtk.Entry())
     self.child.set_text(text)
Exemplo n.º 9
0
 def __init__(self, options = None):
     Element.__init__(self, gtk.ComboBox())
     self.options = []
     for option in options or []:
         self.add_option(option)