Metadata-Version: 2.1
Name: tkinterDev
Version: 1.2.0
Summary: tkinter Tool
Author-email: XiangQinxi <author@example.com>
License: Copyright (c) 2018 The Python Packaging Authority
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/pypa/sampleproject
Project-URL: Bug Tracker, https://github.com/pypa/sampleproject/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

# tkinterDev

tkinter高级工具包，实现了许多高级功能，我会持续更新的。
____
## devdemo
在终端输入以下代码，即可打开实例，看各个组件的功能
```commandline
python -m tkdev
```
____

## DevDrag 
可以使组件拖动另一个组件进行移动，这算是里面做得最好的了。第一个填拖动那个组件使另一个组件移动，第二个填被拖动的组件。第三个填是否是窗口，默认为False。

```python

from src import tkdev as dev
import tkinter as tk

if __name__ == '__main__':
    root = tk.Tk()
    root.geometry("500x500")
    drag_widget = tk.Label(root, background="black", foreground="white", text="Hello DevDrag")
    drag_widget.pack(fill=tk.BOTH, expand=tk.YES)
    dev.DevDrag(drag_widget, drag_widget)
    root.mainloop()
```
运行以上代码，即可拖动窗口中的Label组件，因为是用18行代码写出来，并且无依赖，运行速度很快。但是还未实现调整组件大小的功能，有点苦恼。

### 运行问题
1.为什么我用这个拖动窗口会报错？
答：那是因为组件判断不了你是窗口还是组件，窗口用geometry，组件用place，两种方法不同。所以如果要用来拖动窗口的话，请加上iswindow参数，为True，即可正常运行。

```python

from src import tkdev as dev

dev.DevDrag(widget, window, iswindow=true)
```
____

## DevSubWindow
在Qt里可以使用MDI这个组件制作子窗口，而tkinter中未实现这个功能，而我又想制作tkinter的设计器，需要子窗口功能，于是我就自己做了一个，里面都是有tkinter组件做的，并非ttk。不是我不想要漂亮的界面，而是我发现使用ttk，按钮的边框太长了，显得不美观，于是就用tk组件了。

```python

from src import tkdev as dev
import tkinter as tk

if __name__ == '__main__':
    root = tk.Tk()
    root.geometry("300x300")
    subwindow = dev.DevSubWindow(root, title="DevSubWindow")
    subwindow.place(x=5, y=5, width=290, height=290)

    root.mainloop()
```
### 运行问题
1.暂无，等待反馈
____
## DevTitleBar和DevWindow
这两个组件需要一起搭配着进行使用最好，DevWindow的wm_titlebar可以设置标题栏，而DevTitleBar做的标题栏与DevWindow正好很搭配。

```python

from src import tkdev as dev
import tkinter as tk

if __name__ == '__main__':
    root = dev.DevWindow()
    root.geometry("300x300")
    titlebar = dev.DevTitleBar(root, iswindow=True, window=root)
    root.titlebar(titlebar)
    root.mainloop()
```
可是，当你运行以上的代码之后，你会发现，这个DevTitleBar和DevSubWindow的标题栏一模一样，其实DevSubWindow就是使用DevTitleBar做的。
____
