Selective AutoResize Children?

9 次查看(过去 30 天)
Austin Decker
Austin Decker 2022-5-26
I'm working on a class that adds a component to an app figure and I don't want the component to change size when the figure resizes. Obviously, I could turn AutoResizeChildren off for the figure, but I don't want to do that as I don't know if whomever created the figure wants to keep that behavior. I know if I put the component in a container like a panel,tab, etc it will shield it from resizing, but that doesn't really work in my scenario either. Has anyone figured out a workaround in this situation?

回答(1 个)

Image Analyst
Image Analyst 2022-5-27
Calling your code will place a widget on the figure window of an app the user built with App Designer I presume? Or are you using GUIDE? Can you set the Units properties to 'characters' instead of normalized? Then your widget won't scale if the user resizes their app's window.
  4 个评论
Austin Decker
Austin Decker 2022-5-27
编辑:Austin Decker 2022-5-27
I will give it a shot!
Austin Decker
Austin Decker 2022-5-27
Right, so uipanel doesn't have 'character' units if it is created inside uifigure. Only in figure.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Develop uifigure-Based Apps 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by