How do I convert a 2-panel app into a 3-panel app?

The title kind of says it all.
I have made a 2-panel app with App Developer, but I want a 3rd panel. None of the code controlling the panels is editable (side note: why?), and trying to drag a new panel onto the app just leads to disaster.
How do I do this?

2 件のコメント

Sahithi Kanumarlapudi
Sahithi Kanumarlapudi 2020 年 12 月 16 日
Hi,
You could add the third panel to the app by usual drag and drop of componets to the design view.
Could you provide more information on what you mean by 'code controlling the panels' ?
I might be able to provide more info if you could be more specific on what your two- panel app consisted of.
Gregory Lewin
Gregory Lewin 2021 年 1 月 21 日
When I try to add a third panel, it just adds it as a floating panel to an existing panel. There is no way to add it as another panel to the right of the two existing panels.

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

回答 (1 件)

jingye wang
jingye wang 2021 年 1 月 19 日

0 投票

3 件のコメント

Gregory Lewin
Gregory Lewin 2021 年 1 月 21 日
This is for two panels. I want to add a third.
jingye wang
jingye wang 2021 年 2 月 3 日
function myUpdateAppLayout(app, event)
currentFigureWidth = app.UIFigure.Position(3);
if(currentFigureWidth <= app.onePanelWidth)
% Change to a 3x1 grid
app.GridLayout.RowHeight = {678, 678, 678};
app.GridLayout.ColumnWidth = {'1x'};
app.CenterPanel.Layout.Row = 1;
app.CenterPanel.Layout.Column = 1;
app.LeftPanel.Layout.Row = 2;
app.LeftPanel.Layout.Column = 1;
app.RightPanel.Layout.Row = 3;
app.RightPanel.Layout.Column = 1;
elseif (currentFigureWidth > app.onePanelWidth && currentFigureWidth <= app.twoPanelWidth)
% Change to a 2x2 grid
app.GridLayout.RowHeight = {678, 678};
app.GridLayout.ColumnWidth = {'1x', '1x'};
app.CenterPanel.Layout.Row = 1;
app.CenterPanel.Layout.Column = [1,2];
app.LeftPanel.Layout.Row = 2;
app.LeftPanel.Layout.Column = 1;
app.RightPanel.Layout.Row = 2;
app.RightPanel.Layout.Column = 2;
else
% Change to a 1x3 grid
app.GridLayout.RowHeight = {'1x'};
app.GridLayout.ColumnWidth = {445, 445, '1x'};
app.LeftPanel.Layout.Row = 1;
app.LeftPanel.Layout.Column = 1;
app.CenterPanel.Layout.Row = 1;
app.CenterPanel.Layout.Column = 2;
app.RightPanel.Layout.Row = 1;
app.RightPanel.Layout.Column = 3;
end
end
Bowen Shi
Bowen Shi 2021 年 3 月 4 日
Hi,
Have you find a way to convert the app layout from 2 panel to 3 panel? I just build a new 3-Panel App and copy all the component and code into the new app. I don't think this is a proper way though :(

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

カテゴリ

ヘルプ センター および File ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

質問済み:

2020 年 12 月 6 日

コメント済み:

2021 年 3 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by