Drag and Drop Nodes in uitree

16 ビュー (過去 30 日間)
Sam Mlawer
Sam Mlawer 2021 年 4 月 27 日
回答済み: Shadaab Siddiqie 2021 年 4 月 30 日
Is it possible to drag and drop tree nodes in a uitree to change their order?
Thanks!

採用された回答

Shadaab Siddiqie
Shadaab Siddiqie 2021 年 4 月 30 日
Form my understanding you want to know if drag and drop feature is available for the uitree object. Unfortunately, there is no built-in way to add "uitreenode" objects to a "uitree" while the app is running nor is there a way to rearrange the nodes by dragging them. However, one potential workaround would be to add three buttons to your app. You could add a callback to one button that creates a new "uitreenode" and adds it to the "uitree" when the button is pushed. The other two buttons could have callbacks that reorder the list of "uitreenode" objects in the "uitree". One callback could move the currently selected "uitreenode" up one and the other could move the selected "uitreenode" down one.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by