is there a trick to align uipanel objects w/ e.g. uicontrol objects?

4 ビュー (過去 30 日間)
Michèle
Michèle 2015 年 9 月 28 日
編集済み: Nidhi Jain 2015 年 10 月 1 日
I've build a GUI with some panels and uicontrol objects using a programatic approach. I use the align command to align some objects. It works fine for e.g. 2 uicontrol objects located in one panel. However if I try to align two uipanels or a uipanel and some other uicontrol object, nothing happens.
There is no error message, but seemingly the align command is not having any effect.
In the description of the align command it is said that it can be used to align uicontrol and axes objects but nothing about uipanel objects, therefore I suspect this might be the reason. If so is there any trick to align uipanel with other objects anyway?
thanks in advance for some ideas Michèle
  1 件のコメント
Adam
Adam 2015 年 9 月 28 日
If you are using manual positioning (as oppose to e.g. the GUI Layout Toolbox from the file exchange) then probably the simplest thing is to just ensure the relevant elements of the panel 'Position' vectors line up.

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

回答 (1 件)

Nidhi Jain
Nidhi Jain 2015 年 10 月 1 日
編集済み: Nidhi Jain 2015 年 10 月 1 日
Hi Michele,
As of now, the align tool in guide allows us to align the objects with respect to each other. The align tool does not allow to align objects with respect to the parent like centering buttons in an uipanel. You might have to do it programmatically by setting the 'Position' property of the object wrt to the uipanel 'Position' property.
HTH

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by