File: test_custom_widget_module.py

package info (click to toggle)
pygubu 0.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,768 kB
  • sloc: python: 22,345; sh: 55; makefile: 7
file content (19 lines) | stat: -rw-r--r-- 395 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import tkinter.ttk as ttk
from pygubu.api.v1 import BuilderObject, register_widget


class CustomLabel(ttk.Label):
    def get_message(self):
        return "CustomLabel"


class TestCustomWidgetBuilder(BuilderObject):
    class_ = CustomLabel


register_widget(
    "test_custom_widget_module.custom_label",
    TestCustomWidgetBuilder,
    "CustomWidget",
    ("ttk", "Test Custom Widget"),
)