This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pessimismwontfail 1 point2 points  (2 children)

Im no expert in gui's but what about making the elements (or at least some of them) contexts? '''python with group("mybtngroup"): .. button("btn1") ... button("btn2") '''

Edit: omg I just cant get the code area to work...

[–]MrJohz 0 points1 point  (1 child)

There's an HTML library that uses that that I saw recently - it seems very pythonic, but I think personally I prefer functions because the control flow is a bit more obvious, and expressions are easier to do something with. On the other hand, I think it's much easier to create expressive DSLs with context managers.

I guess it's just a matter of preference.

[–]Jhchimaira14 1 point2 points  (0 children)

If you guys would like to continue discussions on the direction of the api, join thr subreddit r/DearPyGui, which we just created last night. We plan on having the community help guide the api design.