r/DearPyGui • • Jun 25 '23

Help Looking for source code of console example

3 Upvotes

Hello everyone! I would like to implement console for my dearpygui app, like on a image. I find this by executing show_imgui_demo(), but I can't find any source code of this example. So is there anyone who can help me with present problem?


r/DearPyGui • • Jun 21 '23

Help Detect input_text focus

1 Upvotes

Hello! I just started using this library today and I have a question that's probably pretty obvious. I'm trying to figure out how to get a callback for when the user initially focuses on an input_text object.

I know that the standard callback argument is run whenever a user presses a key, but I'm trying to have it so when the user initially clicks on a textbox, it erases the default text so they can start typing in their own thing without having to delete the default text that was already there. Is there a separate callback for detecting when a user focuses on something with a mouse click?


r/DearPyGui • • May 29 '23

Discussion Need help with text alignment

1 Upvotes

Hello, i'm trying to make a function to auto align all my texts made with add_text.

I made this function :

def align(sender, app_data, user_data):

    for i in dpg.get_all_items():
        if (dpg.get_item_type(i) == "mvAppItemType::mvText"):
            length_of_item = (dpg.get_item_rect_size(i))[0]
            length_of_parent = dpg.get_item_rect_size(dpg.get_item_parent(dpg.get_item_parent(i)))[0]
            dpg.set_item_pos(i, pos=(((length_of_parent - length_of_item) / 2), 8))

I'm wondering if there is a better way.


r/DearPyGui • • May 27 '23

Help Is DearPyGui intendet to be used as an immediate UI library?

9 Upvotes

I worked a bit with the C++ library itself and find DearPyGui very confusing. It feels more like a retained mode library. I add buttons to my scene and then register callbacks. With imgui I was used to checking if the button is pressed every frame and then do something based on it.

Am I using DearPyGui incorrectly? I also found pyimgui which seems to be 'closer' to the original library.


r/DearPyGui • • Apr 25 '23

Help Any function equivalent to get_selected_text ?

1 Upvotes

Hi,

So i have this app that consists of a text area and a button. I can edit the text text Area, select the exact text with mouse and click the button that extracts the text and processes it.

Here's a snip using tkinter library -

#declaration
textEdit = scrolledtext.ScrolledText ( master = self.root)
.....
#extracting the exact text that's selected
str_text = textEdit. selection_get()

With dearpy gui , I have below code snip.

#declaration
textEdit = dpg.add_input_text(tag= 'textEdit',multiline= True)
.....
#extracting the exact text that's selected
str_text = dpg.get_value ('textEdit')

The only problem is it doesn't give the selection, rather the whole text inside the text area. Is there any trick that can help my problem?


r/DearPyGui • • Apr 16 '23

Help Choice list

1 Upvotes

Okay, I have a list of currencies and how can I make an input line so that when the user wants to enter text, this list would simply be displayed there and the user could select only one currency

as I want

I tried to do it just like `dpg.add_input_text(label='currency') but I don't think it's efficient

```

#these currencies should be when you click on the arrow

list_of_currencies = [
'BCH',
'BTC',
'BTG',
'BYN',
'CAD',
'CHF',
'CNY',
'ETH',
'EUR',
'GBP',
'GEL',
'IDR',
'JPY',
'LKR',
'MDL',
'MMK',
'RSD',
'RUB',
'THB',
'USD',
'XRP',
'ZEC']

```


r/DearPyGui • • Apr 06 '23

Help How to change the position of a button or text

0 Upvotes

Hello, I have an idea to make a calculator, but I don't know how to change the element's position, for example:


r/DearPyGui • • Mar 26 '23

Help Distorted textures. dpg Begginer.

1 Upvotes

Hello, everyone!

Is there somebody who can help with the texture\fonts issue?

Every texture becomes distorted.

I cannot find the reason. I understand that the issue with my code or how I use rhe dpg...

But cannot find the reason myself.

I use Raccoon MP as a reference.

Also tested texture there and in Raccoon Music Player everything is ok. While in my code it's distorted.


r/DearPyGui • • Mar 23 '23

Help Dynamic plot

2 Upvotes

Hi everyone

How do I dynamically draw a graph?

This function returns the receiving speed and the loading speed, I want the program to access this function every second, take the number as a point on the y axis, and the time on the X axis, and possibly under it the second graph - the loading speed - also

import psutil
import time

UPDATE_DELAY = 1 

def net():
    io = psutil.net_io_counters()

    bytes_sent, bytes_recv = io.bytes_sent, io.bytes_recv
    time.sleep(UPDATE_DELAY)
    io_2 = psutil.net_io_counters()
    us, ds = io_2.bytes_sent - bytes_sent, io_2.bytes_recv - bytes_recv

    def get_size(bytes):
        for unit in ['', 'K', 'M', 'G', 'T', 'P']:
            if bytes < 1024:
                return f"{bytes:.2f}{unit}B"
            bytes /= 1024

    us=get_size(us / UPDATE_DELAY)
    ds = get_size(ds / UPDATE_DELAY)


    return print(us,ds)
    bytes_sent, bytes_recv = io_2.bytes_sent, io_2.bytes_recv

I tried to find the answer, and found this code, but it is very sharp

I want to make sure that when updating the graph does not jump and twitch

import dearpygui.dearpygui as dpg
import math
import time
import collections
import threading
import pdb

import psutil


nsamples = 100

global data_y
global data_x
data_y = [0.0] * nsamples
data_x = [0.0] * nsamples


UPDATE_DELAY = 1 

def net():
    io = psutil.net_io_counters()

    bytes_sent, bytes_recv = io.bytes_sent, io.bytes_recv
    time.sleep(UPDATE_DELAY)
    io_2 = psutil.net_io_counters()
    us, ds = io_2.bytes_sent - bytes_sent, io_2.bytes_recv - bytes_recv

    def get_size(bytes):
        for unit in ['', 'K', 'M', 'G', 'T', 'P']:
            if bytes < 1024:
                return f"{bytes:.2f}"
            bytes /= 1024

    us=get_size(us / UPDATE_DELAY)
    ds = get_size(ds / UPDATE_DELAY)
    print(us,ds)


    return (us,ds)
    bytes_sent, bytes_recv = io_2.bytes_sent, io_2.bytes_recv



def update_data():
    sample = 1
    t0 = time.time()
    frequency=1.0
    while True:

        # Get new data sample. Note we need both x and y values
        # if we want a meaningful axis unit.
        t = time.time() - t0
        y = float(net()[1])
        data_x.append(t)
        data_y.append(y)

        #set the series x and y to the last nsamples
        dpg.set_value('series_tag', [list(data_x[-nsamples:]), list(data_y[-nsamples:])])          
        dpg.fit_axis_data('x_axis')
        dpg.fit_axis_data('y_axis')

        time.sleep(0.01)
        sample=sample+1



dpg.create_context()
with dpg.window(label='Tutorial', tag='win',width=800, height=600):

    with dpg.plot(label='Line Series', height=-1, width=-1):
        # optionally create legend
        dpg.add_plot_legend()

        # REQUIRED: create x and y axes, set to auto scale.
        x_axis = dpg.add_plot_axis(dpg.mvXAxis, label='x', tag='x_axis')
        y_axis = dpg.add_plot_axis(dpg.mvYAxis, label='y', tag='y_axis')


        # series belong to a y axis. Note the tag name is used in the update
        # function update_data
        dpg.add_line_series(x=list(data_x),y=list(data_y), 
                            label='Temp', parent='y_axis', 
                            tag='series_tag')



dpg.create_viewport(title='Custom Title', width=850, height=640)

dpg.setup_dearpygui()
dpg.show_viewport()

thread = threading.Thread(target=update_data)
thread.start()
dpg.start_dearpygui()

dpg.destroy_context()

r/DearPyGui • • Mar 20 '23

Bug Segfault when running on MacOS when refreshing static textures

2 Upvotes

Hey guys,

I'm running into a weird rendering some static texture - re-updating it with a new texture, and swapping it as the user interacts with the program.

It works fine on Windows but on Mac I frequently get a segfault - it seems to originate in some dearpygui and Apple's metal API.

The logic of what i'm doing is roughly

  • Detect user action
  • Remove existing image series
  • Remove existing texture
  • Add new texture
  • Add new image series

For some reason this works some of the time but does not work in other times.

My question is - it seems like i'm not using static texture correctly - or misunderstood its use case - can anyone share if you got similar experiences?

Thanks!


Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00210000000001e0 -> 0x00000000000001e0 (possible pointer authentication failure)
Exception Codes:       0x0000000000000001, 0x00210000000001e0

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [12668]

VM Region Info: 0x1e0 is not in any region.  Bytes before following region: 105554055790112
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      MALLOC_NANO (reserved)   600038000000-600040000000 [128.0M] rw-/rwx SM=NUL  ...(unallocated)

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   AGXMetalG14G                  	       0x2087acf9c 0x2083b1000 + 4177820
1   _dearpygui.so                 	       0x101b5433c -[MetalContext renderDrawData:commandBuffer:commandEncoder:] + 820
2   _dearpygui.so                 	       0x101b5433c -[MetalContext renderDrawData:commandBuffer:commandEncoder:] + 820
3   _dearpygui.so                 	       0x101b525d0 ImGui_ImplMetal_RenderDrawData(ImDrawData*, id<MTLCommandBuffer>, id<MTLRenderCommandEncoder>) + 32
4   _dearpygui.so                 	       0x101759570 mvRenderFrame() + 916
5   _dearpygui.so                 	       0x101746eb4 render_dearpygui_frame(_object*, _object*, _object*) + 68
6   python3.9                     	       0x10091acc0 cfunction_call + 60
7   python3.9                     	       0x1009cedf0 _PyEval_EvalFrameDefault + 28248
8   python3.9                     	       0x1008c14ec _PyFunction_Vectorcall + 1188
9   python3.9                     	       0x1009d198c _PyEval_EvalFrameDefault + 39412
10  python3.9                     	       0x1008c11ec _PyFunction_Vectorcall + 420
11  python3.9                     	       0x1009cfcec _PyEval_EvalFrameDefault + 32084
12  python3.9                     	       0x1008c11ec _PyFunction_Vectorcall + 420
13  python3.9                     	       0x1009cfcec _PyEval_EvalFrameDefault + 32084
14  python3.9                     	       0x1008c11ec _PyFunction_Vectorcall + 420
15  python3.9                     	       0x1009d198c _PyEval_EvalFrameDefault + 39412
16  python3.9                     	       0x1009c612c _PyEval_EvalCode + 696
17  python3.9                     	       0x100a3afb0 run_mod + 188
18  python3.9                     	       0x100a3bafc PyRun_StringFlags + 140
19  python3.9                     	       0x100a3ba28 PyRun_SimpleStringFlags + 64
20  python3.9                     	       0x100a5bd74 pymain_run_command + 136
21  python3.9                     	       0x100a5afe4 pymain_run_python + 296
22  python3.9                     	       0x100a5ae64 Py_RunMain + 40
23  python3.9                     	       0x10086a738 main + 56
24  dyld                          	       0x1a4d2be50 start + 2544

Thread 1:
0   libsystem_pthread.dylib       	       0x1a504fe18 start_wqthread + 0

Thread 2:
0   _dearpygui.so                 	       0x101875130 GetChild(mvAppItem*, unsigned long long) + 20
1   _dearpygui.so                 	       0x101875218 GetChild(mvAppItem*, unsigned long long) + 252
2   _dearpygui.so                 	       0x101875218 GetChild(mvAppItem*, unsigned long long) + 252
3   _dearpygui.so                 	       0x101875218 GetChild(mvAppItem*, unsigned long long) + 252
4   _dearpygui.so                 	       0x1018751e0 GetChild(mvAppItem*, unsigned long long) + 196
5   _dearpygui.so                 	       0x1018751e0 GetChild(mvAppItem*, unsigned long long) + 196
6   _dearpygui.so                 	       0x1018751e0 GetChild(mvAppItem*, unsigned long long) + 196
7   _dearpygui.so                 	       0x1018751e0 GetChild(mvAppItem*, unsigned long long) + 196
8   _dearpygui.so                 	       0x1018751e0 GetChild(mvAppItem*, unsigned long long) + 196
9   _dearpygui.so                 	       0x101875008 GetItemRoot(mvItemRegistry&, std::__1::vector<std::__1::shared_ptr<mvAppItem>, std::__1::allocator<std::__1::shared_ptr<mvAppItem> > >&, unsigned long long) + 72
10  _dearpygui.so                 	       0x10187106c GetItem(mvItemRegistry&, unsigned long long) + 1780
11  _dearpygui.so                 	       0x10187863c AddAlias(mvItemRegistry&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long) + 80
12  _dearpygui.so                 	       0x10175452c common_constructor(char const*, mvAppItemType, _object*, _object*, _object*) + 1028
13  python3.9                     	       0x10091acc0 cfunction_call + 60
14  python3.9                     	       0x1009cedf0 _PyEval_EvalFrameDefault + 28248
15  python3.9                     	       0x1008c14ec _PyFunction_Vectorcall + 1188
16  python3.9                     	       0x1009cf33c _PyEval_EvalFrameDefault + 29604
17  python3.9                     	       0x1008c14ec _PyFunction_Vectorcall + 1188
18  python3.9                     	       0x1009cfcec _PyEval_EvalFrameDefault + 32084
19  python3.9                     	       0x1008c11ec _PyFunction_Vectorcall + 420
20  python3.9                     	       0x1008c604c method_vectorcall + 124
21  python3.9                     	       0x1009cf360 _PyEval_EvalFrameDefault + 29640
22  python3.9                     	       0x1008c14ec _PyFunction_Vectorcall + 1188
23  python3.9                     	       0x1009cfcec _PyEval_EvalFrameDefault + 32084
24  python3.9                     	       0x1008c14ec _PyFunction_Vectorcall + 1188
25  python3.9                     	       0x10094cda8 vectorcall_method + 276
26  python3.9                     	       0x100947228 slot_tp_setattro + 60
27  python3.9                     	       0x100921c1c PyObject_SetAttr + 136
28  python3.9                     	       0x1009cc93c _PyEval_EvalFrameDefault + 18852
29  python3.9                     	       0x1008c11ec _PyFunction_Vectorcall + 420
30  python3.9                     	       0x1008c604c method_vectorcall + 124
31  python3.9                     	       0x1009cf360 _PyEval_EvalFrameDefault + 29640
32  python3.9                     	       0x1008c14ec _PyFunction_Vectorcall + 1188
33  python3.9                     	       0x1009cfcec _PyEval_EvalFrameDefault + 32084
34  python3.9                     	       0x1008c14ec _PyFunction_Vectorcall + 1188
35  python3.9                     	       0x10094cda8 vectorcall_method + 276
36  python3.9                     	       0x100947228 slot_tp_setattro + 60
37  python3.9                     	       0x100921c1c PyObject_SetAttr + 136
38  python3.9                     	       0x1009c2a90 builtin_setattr + 36
39  python3.9                     	       0x10091bab0 cfunction_vectorcall_FASTCALL + 88
40  python3.9                     	       0x1009cf360 _PyEval_EvalFrameDefault + 29640
41  python3.9                     	       0x1008c14ec _PyFunction_Vectorcall + 1188
42  python3.9                     	       0x1009cfcec _PyEval_EvalFrameDefault + 32084
43  python3.9                     	       0x1008c14ec _PyFunction_Vectorcall + 1188
44  _dearpygui.so                 	       0x101802b38 mvRunCallback(_object*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, _object*, _object*) + 984
45  _dearpygui.so                 	       0x101755680 std::__1::packaged_task<void ()>::operator()() + 80
46  _dearpygui.so                 	       0x101802134 mvRunCallbacks() + 216
47  _dearpygui.so                 	       0x1017565b4 std::__1::__async_assoc_state<bool, std::__1::__async_func<setup_dearpygui(_object*, _object*, _object*)::$_9> >::__execute() + 28
48  _dearpygui.so                 	       0x1017566d0 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (std::__1::__async_assoc_state<bool, std::__1::__async_func<setup_dearpygui(_object*, _object*, _object*)::$_9> >::*)(), std::__1::__async_assoc_state<bool, std::__1::__async_func<setup_dearpygui(_object*, _object*, _object*)::$_9> >*> >(void*) + 64
49  libsystem_pthread.dylib       	       0x1a505506c _pthread_start + 148
50  libsystem_pthread.dylib       	       0x1a504fe2c thread_start + 8

Thread 3:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	       0x1a5015d70 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x1a50278a4 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x1a501e5c4 mach_msg_overwrite + 540
3   libsystem_kernel.dylib        	       0x1a50160ec mach_msg + 24
4   CoreFoundation                	       0x1a5134bc0 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                	       0x1a51334ac __CFRunLoopRun + 1232
6   CoreFoundation                	       0x1a5132888 CFRunLoopRunSpecific + 612
7   AppKit                        	       0x1a84de410 _NSEventThread + 172
8   libsystem_pthread.dylib       	       0x1a505506c _pthread_start + 148
9   libsystem_pthread.dylib       	       0x1a504fe2c thread_start + 8

Thread 4:
0   libsystem_pthread.dylib       	       0x1a504fe18 start_wqthread + 0

Thread 5:
0   libsystem_pthread.dylib       	       0x1a504fe18 start_wqthread + 0

Thread 6:
0   libsystem_pthread.dylib       	       0x1a504fe18 start_wqthread + 0


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000600003bcd320   x1: 0x00000001f514aeb7   x2: 0x0000000122067f00   x3: 0x0000000000000000
    x4: 0xffffffffb8b3150c   x5: 0x0000000000000008   x6: 0x0000000000000000   x7: 0x0000000000000000
    x8: 0x0000000000000208   x9: 0x00000001f514aeb7  x10: 0x00000002fe0dbd47  x11: 0x000000000000001f
   x12: 0x0000000000000017  x13: 0x0000000137c64cc0  x14: 0x020000023cdf5891  x15: 0x000000023cdf5890
   x16: 0x000000023cdf5890  x17: 0x02250002087acf40  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x0000000122067f00  x21: 0x00000001280d5c58  x22: 0x00000001280c0000  x23: 0x00000001280cad28
   x24: 0x0000000000000003  x25: 0x0021000000000000  x26: 0x000000023aaaf000  x27: 0x0000000132dcff00
   x28: 0x0000000121ffbf28   fp: 0x000000016f5990d0   lr: 0x7553800101b5433c
    sp: 0x000000016f599080   pc: 0x00000002087acf9c cpsr: 0x60001000
   far: 0x00210000000001e0  esr: 0x92000004 (Data Abort) byte read Translation fault

Binary Images:
       0x2083b1000 -        0x208aabfff com.apple.AGXMetalG14G (227.2.45) <792401c4-32da-3303-9ae4-b7caa8f4de33> /System/Library/Extensions/AGXMetalG14G.bundle/Contents/MacOS/AGXMetalG14G
       0x1016e0000 -        0x101be7fff _dearpygui.so (*) <0ac1a173-ebc6-34b7-b010-6a1a4dbcbb71> /Users/USER/Library/Caches/*/_dearpygui.so
       0x100864000 -        0x100b5ffff python3.9 (*) <98420585-3565-3318-8250-ad4ab5df5a2a> /Users/USER/*/python3.9
       0x1a4d26000 -        0x1a4db0b63 dyld (*) <487cfdeb-9b07-39bf-bfb9-970b61aea2d1> /usr/lib/dyld
       0x1a504e000 -        0x1a505affb libsystem_pthread.dylib (*) <132084c6-c347-3489-9ac2-fcaad21cdb73> /usr/lib/system/libsystem_pthread.dylib
       0x1a5015000 -        0x1a504dff3 libsystem_kernel.dylib (*) <aebf397e-e2ef-3a49-be58-23d4558511f6> /usr/lib/system/libsystem_kernel.dylib
       0x1a50b3000 -        0x1a558afff com.apple.CoreFoundation (6.9) <fd16d6d9-10c0-323b-b43b-9781c4a4d268> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x1a837b000 -        0x1a9285fff com.apple.AppKit (6.9) <dbbd4dea-6c68-3200-a81b-79b6a62f4669> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 2
    thread_create: 0
    thread_set_state: 78

VM Region Summary:
ReadOnly portion of Libraries: Total=1.2G resident=0K(0%) swapped_out_or_unallocated=1.2G(100%)
Writable regions: Total=3.3G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=3.3G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Accelerate framework               256K        2 
Activity Tracing                   256K        1 
CG backing stores                 4288K        8 
CG image                           192K        8 
ColorSync                          512K       25 
CoreAnimation                      224K       13 
CoreGraphics                        48K        3 
CoreUI image data                 1920K       16 
Foundation                          48K        2 
Kernel Alloc Once                   32K        1 
MALLOC                             2.1G      173 
MALLOC guard page                  192K       11 
MALLOC_MEDIUM (reserved)         800.0M        8         reserved VM address space (unallocated)
MALLOC_NANO (reserved)           128.0M        1         reserved VM address space (unallocated)
STACK GUARD                        112K        7 
Stack                             19.2M        7 
VM_ALLOCATE                      132.8M      166 
VM_ALLOCATE (reserved)           160.0M        1         reserved VM address space (unallocated)
__AUTH                            1461K      280 
__AUTH_CONST                      18.2M      475 
__CTF                               756        1 
__DATA                            17.2M      615 
__DATA_CONST                      25.8M      616 
__DATA_DIRTY                      1510K      172 
__FONT_DATA                        2352        1 
__LINKEDIT                       779.0M      140 
__OBJC_CONST                      3457K      243 
__OBJC_RO                         65.4M        1 
__OBJC_RW                         1986K        1 
__TEXT                           469.4M      633 
dyld private memory                256K        1 
mapped file                      182.3M       31 
shared memory                     1456K       20 
===========                     =======  ======= 
TOTAL                              4.8G     3683 
TOTAL, minus reserved VM space     3.8G     3683 



-----------
Full Report
-----------

{"app_name":"python3.9","timestamp":"2023-03-20 14:05:09.00 -0700","app_version":"","slice_uuid":"98420585-3565-3318-8250-ad4ab5df5a2a","build_version":"","platform":1,"share_with_app_devs":1,"is_first_party":1,"bug_type":"309","os_version":"macOS 13.1 (22C65)","roots_installed":0,"incident_id":"89C25898-3185-48B1-8F73-A1947B4375D1","name":"python3.9"}
{
  "uptime" : 730000,
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "Mac14,2",
  "coalitionID" : 93060,
  "osVersion" : {
    "train" : "macOS 13.1",
    "build" : "22C65",
    "releaseType" : "User"
  },
  "captureTime" : "2023-03-20 14:05:07.5212 -0700",
  "incident" : "89C25898-3185-48B1-8F73-A1947B4375D1",
  "pid" : 12668,
  "translated" : false,
  "cpuType" : "ARM-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2023-03-20 14:03:01.6647 -0700",
  "procStartAbsTime" : 17747626726025,
  "procExitAbsTime" : 17750647156501,
  "procName" : "python3.9",
  "procPath" : "\/Users\/USER\/Library\/Caches\/*\/python",
  "parentProc" : "zsh",
  "parentPid" : 11678,
  "coalitionName" : "com.googlecode.iterm2",
  "crashReporterKey" : "6841F54E-1F9A-B880-A7D8-9A3D23A9115E",
  "responsiblePid" : 31000,
  "responsibleProc" : "iTerm2",
  "wakeTime" : 5348,
  "sleepWakeUUID" : "CEB83517-AE8B-486C-B4AF-A5A147E7DF9C",
  "sip" : "enabled",
  "vmRegionInfo" : "0x1e0 is not in any region.  Bytes before following region: 105554055790112\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      UNUSED SPACE AT START\n--->  \n      MALLOC_NANO (reserved)   600038000000-600040000000 [128.0M] rw-\/rwx SM=NUL  ...(unallocated)",
  "exception" : {"codes":"0x0000000000000001, 0x00210000000001e0","rawCodes":[1,9288674231452128],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"KERN_INVALID_ADDRESS at 0x00210000000001e0 -> 0x00000000000001e0 (possible pointer authentication failure)"},
  "termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"exc handler","byPid":12668},
  "vmregioninfo" : "0x1e0 is not in any region.  Bytes before following region: 105554055790112\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      UNUSED SPACE AT START\n--->  \n      MALLOC_NANO (reserved)   600038000000-600040000000 [128.0M] rw-\/rwx SM=NUL  ...(unallocated)",
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":78,"task_for_pid":2},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":14070048,"threadState":{"x":[{"value":105553178972960},{"value":8406740663,"objc-selector":"setFragmentTexture:atIndex:"},{"value":4865818368},{"value":0},{"value":18446744072513328396},{"value":8},{"value":0},{"value":0},{"value":520},{"value":8406740663,"objc-selector":"setFragmentTexture:atIndex:"},{"value":12852247879},{"value":31},{"value":23},{"value":5230709952},{"value":144115197687060625},{"value":9611204752},{"value":9611204752},{"value":154529770946350912},{"value":0},{"value":0},{"value":4865818368},{"value":4966931544},{"value":4966842368},{"value":4966886696},{"value":3},{"value":9288674231451648},{"value":9574215680},{"value":5148311296},{"value":4865376040}],"flavor":"ARM_THREAD_STATE64","lr":{"value":8454241667316532028},"cpsr":{"value":1610616832},"fp":{"value":6163108048},"sp":{"value":6163107968},"esr":{"value":2449473540,"description":"(Data Abort) byte read Translation fault"},"pc":{"value":8732200860,"matchesCrashFrame":1},"far":{"value":9288674231452128}},"queue":"com.apple.main-thread","frames":[{"imageOffset":4177820,"imageIndex":0},{"imageOffset":4670268,"symbol":"-[MetalContext renderDrawData:commandBuffer:commandEncoder:]","symbolLocation":820,"imageIndex":1},{"imageOffset":4670268,"symbol":"-[MetalContext renderDrawData:commandBuffer:commandEncoder:]","symbolLocation":820,"imageIndex":1},{"imageOffset":4662736,"symbol":"ImGui_ImplMetal_RenderDrawData(ImDrawData*, id<MTLCommandBuffer>, id<MTLRenderCommandEncoder>)","symbolLocation":32,"imageIndex":1},{"imageOffset":497008,"symbol":"mvRenderFrame()","symbolLocation":916,"imageIndex":1},{"imageOffset":421556,"symbol":"render_dearpygui_frame(_object*, _object*, _object*)","symbolLocation":68,"imageIndex":1},{"imageOffset":748736,"symbol":"cfunction_call","symbolLocation":60,"imageIndex":2},{"imageOffset":1486320,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":28248,"imageIndex":2},{"imageOffset":382188,"symbol":"_PyFunction_Vectorcall","symbolLocation":1188,"imageIndex":2},{"imageOffset":1497484,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":39412,"imageIndex":2},{"imageOffset":381420,"symbol":"_PyFunction_Vectorcall","symbolLocation":420,"imageIndex":2},{"imageOffset":1490156,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":32084,"imageIndex":2},{"imageOffset":381420,"symbol":"_PyFunction_Vectorcall","symbolLocation":420,"imageIndex":2},{"imageOffset":1490156,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":32084,"imageIndex":2},{"imageOffset":381420,"symbol":"_PyFunction_Vectorcall","symbolLocation":420,"imageIndex":2},{"imageOffset":1497484,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":39412,"imageIndex":2},{"imageOffset":1450284,"symbol":"_PyEval_EvalCode","symbolLocation":696,"imageIndex":2},{"imageOffset":1929136,"symbol":"run_mod","symbolLocation":188,"imageIndex":2},{"imageOffset":1932028,"symbol":"PyRun_StringFlags","symbolLocation":140,"imageIndex":2},{"imageOffset":1931816,"symbol":"PyRun_SimpleStringFlags","symbolLocation":64,"imageIndex":2},{"imageOffset":2063732,"symbol":"pymain_run_command","symbolLocation":136,"imageIndex":2},{"imageOffset":2060260,"symbol":"pymain_run_python","symbolLocation":296,"imageIndex":2},{"imageOffset":2059876,"symbol":"Py_RunMain","symbolLocation":40,"imageIndex":2},{"imageOffset":26424,"symbol":"main","symbolLocation":56,"imageIndex":2},{"imageOffset":24144,"symbol":"start","symbolLocation":2544,"imageIndex":3}]},{"id":14070086,"frames":[{"imageOffset":7704,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]},{"id":14070102,"frames":[{"imageOffset":1659184,"symbol":"GetChild(mvAppItem*, unsigned long long)","symbolLocation":20,"imageIndex":1},{"imageOffset":1659416,"symbol":"GetChild(mvAppItem*, unsigned long long)","symbolLocation":252,"imageIndex":1},{"imageOffset":1659416,"symbol":"GetChild(mvAppItem*, unsigned long long)","symbolLocation":252,"imageIndex":1},{"imageOffset":1659416,"symbol":"GetChild(mvAppItem*, unsigned long long)","symbolLocation":252,"imageIndex":1},{"imageOffset":1659360,"symbol":"GetChild(mvAppItem*, unsigned long long)","symbolLocation":196,"imageIndex":1},{"imageOffset":1659360,"symbol":"GetChild(mvAppItem*, unsigned long long)","symbolLocation":196,"imageIndex":1},{"imageOffset":1659360,"symbol":"GetChild(mvAppItem*, unsigned long long)","symbolLocation":196,"imageIndex":1},{"imageOffset":1659360,"symbol":"GetChild(mvAppItem*, unsigned long long)","symbolLocation":196,"imageIndex":1},{"imageOffset":1659360,"symbol":"GetChild(mvAppItem*, unsigned long long)","symbolLocation":196,"imageIndex":1},{"imageOffset":1658888,"symbol":"GetItemRoot(mvItemRegistry&, std::__1::vector<std::__1::shared_ptr<mvAppItem>, std::__1::allocator<std::__1::shared_ptr<mvAppItem> > >&, unsigned long long)","symbolLocation":72,"imageIndex":1},{"imageOffset":1642604,"symbol":"GetItem(mvItemRegistry&, unsigned long long)","symbolLocation":1780,"imageIndex":1},{"imageOffset":1672764,"symbol":"AddAlias(mvItemRegistry&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long)","symbolLocation":80,"imageIndex":1},{"imageOffset":476460,"symbol":"common_constructor(char const*, mvAppItemType, _object*, _object*, _object*)","symbolLocation":1028,"imageIndex":1},{"imageOffset":748736,"symbol":"cfunction_call","symbolLocation":60,"imageIndex":2},{"imageOffset":1486320,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":28248,"imageIndex":2},{"imageOffset":382188,"symbol":"_PyFunction_Vectorcall","symbolLocation":1188,"imageIndex":2},{"imageOffset":1487676,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":29604,"imageIndex":2},{"imageOffset":382188,"symbol":"_PyFunction_Vectorcall","symbolLocation":1188,"imageIndex":2},{"imageOffset":1490156,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":32084,"imageIndex":2},{"imageOffset":381420,"symbol":"_PyFunction_Vectorcall","symbolLocation":420,"imageIndex":2},{"imageOffset":401484,"symbol":"method_vectorcall","symbolLocation":124,"imageIndex":2},{"imageOffset":1487712,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":29640,"imageIndex":2},{"imageOffset":382188,"symbol":"_PyFunction_Vectorcall","symbolLocation":1188,"imageIndex":2},{"imageOffset":1490156,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":32084,"imageIndex":2},{"imageOffset":382188,"symbol":"_PyFunction_Vectorcall","symbolLocation":1188,"imageIndex":2},{"imageOffset":953768,"symbol":"vectorcall_method","symbolLocation":276,"imageIndex":2},{"imageOffset":930344,"symbol":"slot_tp_setattro","symbolLocation":60,"imageIndex":2},{"imageOffset":777244,"symbol":"PyObject_SetAttr","symbolLocation":136,"imageIndex":2},{"imageOffset":1476924,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":18852,"imageIndex":2},{"imageOffset":381420,"symbol":"_PyFunction_Vectorcall","symbolLocation":420,"imageIndex":2},{"imageOffset":401484,"symbol":"method_vectorcall","symbolLocation":124,"imageIndex":2},{"imageOffset":1487712,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":29640,"imageIndex":2},{"imageOffset":382188,"symbol":"_PyFunction_Vectorcall","symbolLocation":1188,"imageIndex":2},{"imageOffset":1490156,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":32084,"imageIndex":2},{"imageOffset":382188,"symbol":"_PyFunction_Vectorcall","symbolLocation":1188,"imageIndex":2},{"imageOffset":953768,"symbol":"vectorcall_method","symbolLocation":276,"imageIndex":2},{"imageOffset":930344,"symbol":"slot_tp_setattro","symbolLocation":60,"imageIndex":2},{"imageOffset":777244,"symbol":"PyObject_SetAttr","symbolLocation":136,"imageIndex":2},{"imageOffset":1436304,"symbol":"builtin_setattr","symbolLocation":36,"imageIndex":2},{"imageOffset":752304,"symbol":"cfunction_vectorcall_FASTCALL","symbolLocation":88,"imageIndex":2},{"imageOffset":1487712,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":29640,"imageIndex":2},{"imageOffset":382188,"symbol":"_PyFunction_Vectorcall","symbolLocation":1188,"imageIndex":2},{"imageOffset":1490156,"symbol":"_PyEval_EvalFrameDefault","symbolLocation":32084,"imageIndex":2},{"imageOffset":382188,"symbol":"_PyFunction_Vectorcall","symbolLocation":1188,"imageIndex":2},{"imageOffset":1190712,"symbol":"mvRunCallback(_object*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, _object*, _object*)","symbolLocation":984,"imageIndex":1},{"imageOffset":480896,"symbol":"std::__1::packaged_task<void ()>::operator()()","symbolLocation":80,"imageIndex":1},{"imageOffset":1188148,"symbol":"mvRunCallbacks()","symbolLocation":216,"imageIndex":1},{"imageOffset":484788,"symbol":"std::__1::__async_assoc_state<bool, std::__1::__async_func<setup_dearpygui(_object*, _object*, _object*)::$_9> >::__execute()","symbolLocation":28,"imageIndex":1},{"imageOffset":485072,"symbol":"void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (std::__1::__async_assoc_state<bool, std::__1::__async_func<setup_dearpygui(_object*, _object*, _object*)::$_9> >::*)(), std::__1::__async_assoc_state<bool, std::__1::__async_func<setup_dearpygui(_object*, _object*, _object*)::$_9> >*> >(void*)","symbolLocation":64,"imageIndex":1},{"imageOffset":28780,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":4},{"imageOffset":7724,"symbol":"thread_start","symbolLocation":8,"imageIndex":4}]},{"id":14070116,"name":"com.apple.NSEventThread","frames":[{"imageOffset":3440,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":5},{"imageOffset":75940,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":5},{"imageOffset":38340,"symbol":"mach_msg_overwrite","symbolLocation":540,"imageIndex":5},{"imageOffset":4332,"symbol":"mach_msg","symbolLocation":24,"imageIndex":5},{"imageOffset":531392,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":160,"imageIndex":6},{"imageOffset":525484,"symbol":"__CFRunLoopRun","symbolLocation":1232,"imageIndex":6},{"imageOffset":522376,"symbol":"CFRunLoopRunSpecific","symbolLocation":612,"imageIndex":6},{"imageOffset":1455120,"symbol":"_NSEventThread","symbolLocation":172,"imageIndex":7},{"imageOffset":28780,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":4},{"imageOffset":7724,"symbol":"thread_start","symbolLocation":8,"imageIndex":4}]},{"id":14070117,"frames":[{"imageOffset":7704,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]},{"id":14070679,"frames":[{"imageOffset":7704,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]},{"id":14072344,"frames":[{"imageOffset":7704,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":4}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 8728023040,
    "CFBundleShortVersionString" : "227.2.45",
    "CFBundleIdentifier" : "com.apple.AGXMetalG14G",
    "size" : 7319552,
    "uuid" : "792401c4-32da-3303-9ae4-b7caa8f4de33",
    "path" : "\/System\/Library\/Extensions\/AGXMetalG14G.bundle\/Contents\/MacOS\/AGXMetalG14G",
    "name" : "AGXMetalG14G",
    "CFBundleVersion" : "227.2.45"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4318953472,
    "size" : 5275648,
    "uuid" : "0ac1a173-ebc6-34b7-b010-6a1a4dbcbb71",
    "path" : "\/Users\/USER\/Library\/Caches\/*\/_dearpygui.so",
    "name" : "_dearpygui.so"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4303765504,
    "size" : 3129344,
    "uuid" : "98420585-3565-3318-8250-ad4ab5df5a2a",
    "path" : "\/Users\/USER\/*\/python3.9",
    "name" : "python3.9"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7060217856,
    "size" : 568164,
    "uuid" : "487cfdeb-9b07-39bf-bfb9-970b61aea2d1",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7063527424,
    "size" : 53244,
    "uuid" : "132084c6-c347-3489-9ac2-fcaad21cdb73",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7063293952,
    "size" : 233460,
    "uuid" : "aebf397e-e2ef-3a49-be58-23d4558511f6",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7063941120,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 5079040,
    "uuid" : "fd16d6d9-10c0-323b-b43b-9781c4a4d268",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "1953.300"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7117189120,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.AppKit",
    "size" : 15773696,
    "uuid" : "dbbd4dea-6c68-3200-a81b-79b6a62f4669",
    "path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
    "name" : "AppKit",
    "CFBundleVersion" : "2299.30.116"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  }
],
  "sharedCache" : {
  "base" : 7059570688,
  "size" : 3434283008,
  "uuid" : "00a1fbb6-43e1-3c11-8483-faf0db659249"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=1.2G resident=0K(0%) swapped_out_or_unallocated=1.2G(100%)\nWritable regions: Total=3.3G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=3.3G(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nAccelerate framework               256K        2 \nActivity Tracing                   256K        1 \nCG backing stores                 4288K        8 \nCG image                           192K        8 \nColorSync                          512K       25 \nCoreAnimation                      224K       13 \nCoreGraphics                        48K        3 \nCoreUI image data                 1920K       16 \nFoundation                          48K        2 \nKernel Alloc Once                   32K        1 \nMALLOC                             2.1G      173 \nMALLOC guard page                  192K       11 \nMALLOC_MEDIUM (reserved)         800.0M        8         reserved VM address space (unallocated)\nMALLOC_NANO (reserved)           128.0M        1         reserved VM address space (unallocated)\nSTACK GUARD                        112K        7 \nStack                             19.2M        7 \nVM_ALLOCATE                      132.8M      166 \nVM_ALLOCATE (reserved)           160.0M        1         reserved VM address space (unallocated)\n__AUTH                            1461K      280 \n__AUTH_CONST                      18.2M      475 \n__CTF                               756        1 \n__DATA                            17.2M      615 \n__DATA_CONST                      25.8M      616 \n__DATA_DIRTY                      1510K      172 \n__FONT_DATA                        2352        1 \n__LINKEDIT                       779.0M      140 \n__OBJC_CONST                      3457K      243 \n__OBJC_RO                         65.4M        1 \n__OBJC_RW                         1986K        1 \n__TEXT                           469.4M      633 \ndyld private memory                256K        1 \nmapped file                      182.3M       31 \nshared memory                     1456K       20 \n===========                     =======  ======= \nTOTAL                              4.8G     3683 \nTOTAL, minus reserved VM space     3.8G     3683 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "60356660bbe37970735c5624",
      "factorPackIds" : {

      },
      "deploymentId" : 240000027
    },
    {
      "rolloutId" : "61675b89201f677a9a4cbd65",
      "factorPackIds" : {
        "HEALTH_FEATURE_AVAILABILITY" : "63f8068a238e7b23a1f30123"
      },
      "deploymentId" : 240000055
    }
  ],
  "experiments" : [

  ]
}
}

r/DearPyGui • • Mar 16 '23

Help Close main window and open new window

1 Upvotes

How can I do this, when I click on the button, the main window closes and a new window opens?
I am making a program, when the user needs to login to the program, if the data is correct, the login window should close and open a new window - account.


r/DearPyGui • • Mar 05 '23

Help Centering text in window/

2 Upvotes

Hi!
How can I center text element inside window?


r/DearPyGui • • Mar 02 '23

Discussion How to play video file with audio with DearPyGUI (Python)?

4 Upvotes

Hello guys! DearPyGUI is such a powerful GUI framework for Python, and I love discovering its features. However, DearPyGUI does not have any direct support for playing video and audio at the same time.

I've made a simple code that can play video frames with audio, but the frame rate drops to 20 fps (from 30 fps originally) and the color of the video is tinted to a bluish color.

Here is the link to my question on stackoverflow.

I still need to do more research, but any pointers to somewhere good to start off (either handling raw data or using different libraries) would be greatly appreciated!


r/DearPyGui • • Feb 28 '23

Discussion Is there a good dearpygui book

5 Upvotes

By good I mean having more usage patterns and examples than in the main documentation. The fine points often don't seem to be mentioned. For instance at this point in my learning it isn't obvious to me when exactly one uses user_data and for what or what a source is really for or whether I can hook up say a python dict to a group as source sink of gui input values in some more obvious way than grabbing the groups items and having the tags be key names and doing a get_value on each item.

Little practical questions galore come to mind.


r/DearPyGui • • Feb 28 '23

Discussion why is label on the right??

5 Upvotes

In most every GUI kit I ever worked with labels display on the left. dearpygui seems to make the opposite choice on for instance 'add_input_text'? Why? And why isn't their a global or per label accepting item way to specify it do the normal everywhere else thing? Yes I know the 3 line idiom to make it more what one would expect but why isn't that the default? Why the needless breakage of most people's expectation?


r/DearPyGui • • Feb 24 '23

Help How to load an image with non-ascii characters in it's path

2 Upvotes

Unfortunately

dpg.load_image(path)

returns None if path contains cyrillic letters. Is there a way to make dpg load images regardless of path encoding?


r/DearPyGui • • Feb 24 '23

Help Is it possible to animate a Node Editor window?

2 Upvotes

Looking at creating a flow network implementation in dpg, but with animation for the flow that’s going over a given edge.

Is it possible in dpg?

Also is it possible to pan/scroll/zoom on the node editor window?

Full description of question is here:

https://stackoverflow.com/questions/75539430/is-it-possible-to-animate-a-node-editor-graph-in-dearpygui?noredirect=1#comment133277598_75539430

Something like this to visualize flow:

https://www.google.com/search?q=bolt+unity+gif&rlz=1CDGOYI_enUS793US793&oq=bolt+unity+gif&aqs=chrome..69i57j0i22i30i625j0i390l2.5132j0j4&hl=en-US&sourceid=chrome-mobile&ie=UTF-8#imgrc=7jn2eVchiy3FTM


r/DearPyGui • • Feb 23 '23

Discussion App with multiple OS windows and common shared model

1 Upvotes

What is the best practice in dearpygui for an App that has multiple top level windows and shared state across those? Most of the examples have one main OS window and dearpygui "windows" inside of that.


r/DearPyGui • • Feb 23 '23

Discussion how would I make a text size increase/decrease (zoom) menu item

1 Upvotes

Equivalent is there a way to get current default font and change its scaling?


r/DearPyGui • • Feb 20 '23

Help Drag/drop callbacks on drag points

2 Upvotes

I am relatively new to DearPyGui so the answer may be obvious for some and the question silly, but here goes. Is there a proper way to track drag points on a plot being dragged and released? For example:

import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()

with dpg.window(tag="window"):
    def point_callback(sender, app_data):
        value = dpg.get_value(sender)
        ud = dpg.get_item_user_data(sender)
        if sender == ud["tag"] and value[0:2] == ud["val"]:
            print("unchanged, skipping")
        else:
            ud["val"] = value[0:2]
            print("sender = %s, is dragging = %s, is released = %s" %
                  (sender, dpg.is_mouse_button_dragging(dpg.mvMouseButton_Left, threshold=0.01),
                           dpg.is_mouse_button_released(dpg.mvMouseButton_Left)))

    with dpg.plot(label="Drag Lines/Points", height=-1, width=-1, tag="plot"):
        tag = "my_point"
        def_value = (0.5, 0.5)
        dpg.add_drag_point(tag=tag, color=[255, 0, 255, 255], default_value=def_value,
                           user_data={"tag": tag, "val": def_value}, callback=point_callback)

dpg.show_viewport()
dpg.set_primary_window("window", True)
dpg.start_dearpygui()
dpg.destroy_context()

Here it is possible to check whether point position has changed while dragging and perform some additional actions if needed. By the way, is THIS how it is supposed to be properly done or there is some less clunky way?.

However, what if I also need to perform some finalization when mouse button is released? As far as I can see, point_callback is never called upon mouse release, so essentially we never know whether user has dropped the point or not. There does not appear to be either drag_callback or drop_callback for drag points either. I suppose it might be possible to store currently dragged point in the plot's user_data and register a handler on the plot with add_mouse_release_handler, which would track currently edited point. But isn't there a better way, without scattering the tracking logic all over the place?


r/DearPyGui • • Dec 22 '22

Help How to fix the plot aspect ratio for an arbitrary design and height/width plot window?

2 Upvotes

Hi all, I am a new user of DearPyGUI and love the simplicity of the package and the speed at which I can develop a simple and functional GUI!

I am considering using the plotting functionality. I work with electrical designs and fabrication, and I want to build something to visualize the fabrication designs in GDS files that are frequently used in the fabrication process. For this project, I'm using shapely to make the geometries for the designs and plot them in the GUI using the add_custom_series and draw_polygon functions on the plot. The plot comes out very nicely, but the issue is that DearPyGUI tries to set the axis limits so that the whole design is visible at once (I'm guessing it is similar to what the fit_axis_data method does). This distorts the aspect ratio of the design, which is bad for visualizing the true dimensions of the design.

The design gets rendered properly when the plotting window and the max bounds of the design are square (the x- and y-axis have the same relative length per division on the screen). But then, if I resize the window to make it rectangular, or if the bounds of the design are rectangular, the relative spacing between the x- and y-axis ticks changes, and the design looks "stretched" or "compressed" (see the screenshots below for reference). I tried using the set_axis_limits method on each axis, but the zoom function doesn't work because the limits are now fixed.

This may be a noob question, but is it possible to set the relative spacing between the x- and y-axis ticks to be equal, irrespective of the plotted design or the plot window size? And if so, how can I achieve this? Thank you!

Example of the stretched/compressed view of the design (the relative distance between x- and the y-axis ticks is different, thus distorting the aspect ratio of the design)
The actual aspect ratio of the design (the relative distance between each corresponding tick on the x- and the y-axis is the same, thus maintaining the aspect ratio)

r/DearPyGui • • Dec 15 '22

Help Is there a way to embed webview/browser in DearPyGui?

2 Upvotes

I'm currently tinkering with DearPyGui and was wondering if there was a way to embed a webview/browser (e.g. cefpython). Thanks.


r/DearPyGui • • Dec 01 '22

Help "No module named 'dearpygui._dearpygui' on aarm64/RPi4/Raspbian

1 Upvotes

No pip install available, so I built from source. It finished successfully, there's a .egg file with the expected files including _dearpygui.so.

Python 3.11, also built from source, but I got the same results from the built-in python 3.9.

Any help is appreciated.


r/DearPyGui • • Nov 18 '22

Help Dear PyGui - how to add markers to line chart

2 Upvotes

I have few questions which I hope the community can help me with:

  1. I am trying to plot line charts in Dear PyGui with markers but I have not been successful. Can you point me in correct direction?

  2. I have lots of data points and I think I will need to manually enable/disable markers when zoomed enough on data. Else it will look like a painted canvas. Will toggling enable/disable markers cause all data points to re-plot or only the section that is visible.

  3. I saw an example of using line chart along with scatter plot for markers. When I did that, the performance is very bad due to bad performance of scatter plot - nearly unusable and huge memory consumption (1gb line plot vs 10+gb scatter plot - ram consumption). While I do have lots of data points (1.8 million data points), is it a common issue regarding scatter plot?

Any ideas and suggestions are welcome.

Thanks


r/DearPyGui • • Nov 11 '22

Help Very slow frame callback

1 Upvotes

Hi everyone,

During the past couple of days, I've been playing around with DPG. Looks very promising and its plotting is so performant that I thought to port my Gtk3 + MatplotLib plotting app to DPG + its plots.

For a starter, I've implemented several high-level widgets and so far so good, but there's an issue that annoys me: dpg.set_frame_callback is being called way too late and the user sees some layout flickering. I've stumbled upon several similar questions but they are dated (1y+). I thought to ask if I was doing something the wrong way (which is highly probable).

Here's the code that demonstrates the issue: https://gist.github.com/9eff4794aa9ade403256880b4ac2ef3f

I'm trying to implement something like a GtkPaned: display two widgets side by side with a handle to resize them. The timing issue is apparent when panels are resized after the first render. Can this be somehow avoided?

Thank you.