nle244 / 4GP-Password-Manager

MIT License
3 stars 0 forks source link

Better Frame management #7

Open dkim286 opened 2 years ago

dkim286 commented 2 years ago

Description

Currently, Treeview is re-rendered whenever create_db_table is called in UI:

https://github.com/nle244/4GP-Password-Manager/blob/a341ae797b2b63af047f36bd9fb49faeb19e4e6b/pm/ui.py#L98-L112

Issue

This is somewhat redundant as each button, label, and treeview objects are re-created whenever create_db_table is invoked.

Suggestion

Spinoff the treeview into a separate frame and keep it around instead of invoking clear_frame() over and over again.

If this fix requires switching between frames, then various grid layout functions can be used to "swap" between frames:

https://tkdocs.com/shipman/grid-methods.html (grid_forget())

dkim286 commented 2 years ago

b56058f336811771da651c3cb26c19ea853886a2