uifigure vs figure - advice please

61 ビュー (過去 30 日間)
Justin
Justin 2021 年 2 月 8 日
編集済み: Adam Danz 2021 年 2 月 9 日
We have a set of Matlab-based tools that all use a common set of GUI superclasses to provide a consistent look and feel plus certain common functionality. They pre-date uifigure so use figure to create the GUIs. There are some features that are only available in GUIs created using uifigure, e.g. scrollable panels, plus the compatibility with the App Designer.
As a test I changed our superclass to use uifigure and encountered a pile of warnings and errors when testing with one of our tools. Obviously I can work through those but expect I will find the same in our other tools using the same GUI superclasses.
So, my questions are:
1) Is there a guide specifically for converting figure-based GUIs to uifigure-based? A checklist of what properties/methods are different even. I couldn't find anything.
2) Any experience/comments on how much pain is involved? If it was just one tool I'd go for it but it's a suite of tools in our case.
  5 件のコメント
Justin
Justin 2021 年 2 月 9 日
I wasn't expecting a definitive answer so your thoughts were appreciated. It didn't seem trivial to me either and it was useful to have that confirmed.
It turned out that implementing a custom scrollable uitab in my existing figure-based GUI wasn't so difficult, so I've done that for now.
Will look to move over to uifigure at a later date as no doubt its native scrollable containers will be better than mine.
Adam Danz
Adam Danz 2021 年 2 月 9 日
編集済み: Adam Danz 2021 年 2 月 9 日
My $0.02 on this in a recent similar question: [here].
One of the biggest differences is the HandleVisibility between uifigure ('off') and regular figures ('on') which requires using parent handles when adding anything to the figure but this is a good habbit to get into, anyway.
UIaxes (and uifgures) are still a bit slower to render than regular axes/figure [see this comparison from r2019b]. That comparison includes a lot of overhead in appdesigner but the difference still exists outside of appdesigner.
As you mentioned, there are a lot of nice features designed for uifigures and if you plan on using those features, it may be tipping point to your decision. If you're not planning on using those features, I see no reason to make the switch.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop uifigure-Based Apps についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by