Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_class(self):
self.assertIsInstance(self.widget,
pygubu.widgets.scrollbarhelper.ScrollbarHelper)
self.widget.destroy()
def create_treeview_widget_list(self, treelist):
# sbhelper widget
sbhelper = ScrollbarHelper(self.widgetlist, scrolltype='both')
# widgetlisttv widget
widgetlisttv = ttk.Treeview(sbhelper)
widgetlisttv.configure(selectmode='browse', show='tree')
widgetlisttv.grid(column='0', row='0', sticky='nsew')
sbhelper.add_child(widgetlisttv)
sbhelper.configure(usemousewheel='true')
sbhelper.grid(column='0', row='0', sticky='nsew')
#Default widget image:
default_image = ''
try:
default_image = StockImage.get('22x22-tk.default')
except StockImageException as e:
pass
def _create_ui(self):
self._sbh = ScrollbarHelper(self)
self._sbh.grid(row=0, column=0, sticky='we')
self._text = text = tk.Text(self._sbh, width=20, height=3)
self._sbh.add_child(self._text)
self.rowconfigure(0, weight=1)
self.columnconfigure(0, weight=1)
text.bind('', self._on_variable_changed)