from tkinter import Tk, messagebox
from tkouter import *
class HelloWorld(TkOutWidget):
layout = """
<html>
<head>
<title> hello world </title>
</head>
<body>
<button width="20" command="{self.hello}">
Click
</button>
</body>
</html>"""
def hello(self):
messagebox.showinfo('welcome to tkouter', 'hello world')
if __name__ == '__main__':
root = Tk()
hl = HelloWorld(root)
hl.pack()
root.mainloop()Creating GUI layout can be troublesome sometimes. This package provides an easy way that you can use familar html to create layout. Also, it can help you save lots of time on the settings of widgets, variable management and more. This package helps user to use MVC pattern to do GUI design.
Use pip:
$ pip install tkouteror you can clone this repo directly.
$ git clone https://github.com/dokelung/tkouter.git- Use html (xml) to layout
- Support css to config widgets