added an example demo

This commit is contained in:
paul
2024-10-01 19:38:15 +05:30
parent bdfd875d00
commit 704c864b68
3 changed files with 41 additions and 0 deletions

View File

@@ -53,6 +53,47 @@ Try [PyUIBuilder](https://pyuibuilder.pages.dev/)
## Docs - Getting started
Read the docs on the [Docs page](https://pyuibuilder-docs.pages.dev/)
## Example app
<img src="./demos/sample.png" alt="demo" width="600">
**Output code generated for tkinter**
```py
# This code is generated by PyUIbuilder: https://github.com/PaulleDemon/PyUIBuilder
import tkinter as tk
from tktimepicker import AnalogPicker, AnalogThemes, constants
import tkintermapview
main = tk.Tk()
main.config(bg="#332f2f")
main.title("Main Window")
timepicker = AnalogPicker(parent=main, type=constants.HOURS12)
timepicker_theme = AnalogThemes(timepicker)
timepicker_theme.setNavyBlue()
timepicker.place(x=80.66945161331148, y=145.9470669173186, width=250, height=350)
map_viewer = tkintermapview.TkinterMapView(master=main)
map_viewer.place(x=423, y=181, width=400, height=250)
label = tk.Label(master=main, text="Sample text")
label.config(bg="#E4E2E2", fg="#000")
label.place(x=83.81659218916774, y=69.66640453620676, width=130, height=46)
button = tk.Button(master=main, text="Click me")
button.config(bg="#65ff4a", fg="#0b0909")
button.place(x=457, y=108, width=80, height=40)
main.mainloop()
```
**Output produced tkinter (linux)**
<img src="./demos/demo-output.png" alt="demo" width="600">
Tkinter is OS dependent, output may vary based on OS.
## 3 Easy steps.
1. Select a UI library/framework.
2. Drag and drop widgets.

BIN
demos/demo-output.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
demos/sample.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB