def on_resize(self): """ update child controls """ VerticalContainer.on_resize(self) self.output.update() self.input.label.update()
def __init__(self, parent=None, initial='', **kwargs): VerticalContainer.__init__(self, parent, **kwargs) InputControl.__init__(self) self.output = self.add_child( SimpleLabel(label = initial, autosize = False), EXPAND_BOTH) self.output.wrap = True self.input = self.add_child( Input(), EXPAND_HORIZ) self.input.on_return = self.on_return self.input.set_height_to_font() self.input_buffer = [] self.input_buffer_pos = -1 self.input_buffer_orig = ''