def Tools(self, parent): ''' Draw tools widget. ''' tools = Widget(parent) tools.setPosition((20, 420)) layout = BoxLayout(Orientation.Horizontal, Alignment.Middle, 0, 2) tools.setLayout(layout) tools2 = Widget(tools) tools2.setFixedWidth(150) b_size = (28, 28) b = Button(tools, "", entypo.ICON_ADD_TO_LIST) b.setFixedSize(b_size) def add(): print("Add") b.setCallback(add) # Settings. b = Button(tools, "", entypo.ICON_ADJUST) b.setFixedSize(b_size) def settings(): print("Add") self.main_wnd.setVisible(False) b.setCallback(settings) # b = Button(tools, "", entypo.ICON_ALIGN_BOTTOM) b.setFixedSize(b_size) # Save. b = Button(tools, "", entypo.ICON_INSTALL) b.setFixedSize(b_size)