Drag and Drop - MatLab AppDesigner

51 ビュー (過去 30 日間)
Koussou Axel
Koussou Axel 2024 年 1 月 9 日
コメント済み: Prof. X 2025 年 11 月 11 日 14:16
Hi,
I'd like to a drag and drop a file to put it on the graphic interface of an App created with the Matlab AppDesigner but I didn't find out how. The drag and drop must be from a .mat file located on my computer to an Edit Field (Text) component, in order to be then reused through the program.
Any help would be appreciated :)
Thank you in advance for your answers
  2 件のコメント
Mehmed Saad
Mehmed Saad 2024 年 1 月 9 日
is drag and drop necessary? you can use uigetfile as an alternative
Koussou Axel
Koussou Axel 2024 年 1 月 9 日
Hi,
Thank you for your return.
Yes, I'm aware of uigetfile, which works perfectly. However, drag and drop would be much more convenient and faster.
Regards

サインインしてコメントする。

採用された回答

Prof. X
Prof. X 2024 年 1 月 12 日
編集済み: Prof. X 2024 年 1 月 15 日
Have you seen this? It is a file drag and drop for uifigures.
I have used it with some success.
  4 件のコメント
Piyush
Piyush 2025 年 10 月 16 日
Hi Prof X,
I tried using this solution in both Matlab 2025a and 2024b, and it doesn't seem like the callback is getting called. I put in alerts/msgboxes in both the JavaScript inside the DnD_uifigure script, and in the CheckFile function. Is there something wrong in my code? I am using Rocky Linux 8.10 if that helps.
Prof. X
Prof. X 2025 年 11 月 11 日 14:16
I was using MATLAB 2020b when I made this so there could be some version differences.
Did you try my example code specifically and it did not work?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by