Working Drag-and-Drop for DearPyGui, Windows only
Project description
DearPyGui-DragAndDrop
Working Drag-and-drop for DearPyGui, Windows only
How to install/use
-
Install the DearPyGui-DragAndDrop package:
pip install DearPyGui-DragAndDrop
-
Import and then initialize the library after
dpg.create_context()
:
import dearpygui.dearpygui as dpg
import DearPyGui_DragAndDrop as dpg_dnd
dpg.create_context()
dpg_dnd.initialize()
- That's it, just set your function for
drop
and your minimal use case is ready:
import dearpygui.dearpygui as dpg
import DearPyGui_DragAndDrop as dpg_dnd
dpg.create_context()
dpg_dnd.initialize()
dpg.create_viewport(title="Drag and drop example", width=600, height=600)
def drop(data, keys):
print(f'{data}')
print(f'{keys}')
dpg_dnd.set_drop(drop)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
More examples of use are in the Examples folder
Supported Formats
- File(s) paths (will be in the form of a
list of strings
) - Text (will be
string
)
Everything else will be None
or will be a string
TODO list:
- Documentation and code/functions comments
- Add support for more and other data types: maybe this is the right list
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for DearPyGui-DragAndDrop-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 058765828f0e5613225bf587ea6f2f029ad0797a3ab992ae37254266d95a0e36 |
|
MD5 | 4eabc692a5af35641818fdf7b55c4839 |
|
BLAKE2b-256 | db92ee6d8f0f91bd072ac1379803076b54c205563ff29137279f015d28b67c32 |
Close
Hashes for DearPyGui_DragAndDrop-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a94d635e0b3baa930b4b98d5aa617d7406eeab7b488eae612ae678815dace565 |
|
MD5 | e89d789283b6c78472077b94f7cc4f6a |
|
BLAKE2b-256 | 4e12d766b0a8fa495a4936d4c57d810b144260d9a17d97d7484bbdd6cc307666 |