フィルターのクリア

App designer: position of controls problem

2 ビュー (過去 30 日間)
Sébastien
Sébastien 2024 年 1 月 4 日
回答済み: Manikanta Aditya 2024 年 1 月 8 日
Hello,
As you can see in the attached figure, my controls are not placed in the right place when the application is running.
In the "Design view", the gauges are well placed as well as the LED, but as soon as I execute the code, they move:
Thank you
Sébastien

回答 (1 件)

Manikanta Aditya
Manikanta Aditya 2024 年 1 月 8 日
Hi Sebastien,
As per understanding, you are working with MATLAB App Designer, and you are having some issues with the placement of the controls.
In the ‘Design view’, the gauges for temperature and humidity, as well as the LED indicator, are well-placed. However, during runtime, these elements seem to be misaligned. The gauges overlap each other, and the LED indicator moves to the right above the humidity gauge.
This issue could be due to the way the positioning of these elements is handled in your code during runtime. It’s possible that the code might be altering the positions of these elements when the application is run.
Also, the issue can be due to the way the application handles layout and resizing. Try to check the following mentioned points,
  • Layout Properties: Ensure that the layout properties of your controls (like margins, alignment, etc.) are set correctly. Some controls might have properties like 'Dock', 'Anchor', 'Margin', 'Padding', etc. that influence their position and size.
  • Parent Container: Check the properties of the parent container of your controls. Some containers have their own layout logic which could affect the positioning of child controls.
So, I recommend you to check the relevant section of the code that handle the positioning of the elements.
I hope this resolves the issue you were facing.

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!