Info

This question is closed. Reopen it to edit or answer.

Bug Matlab R2020A - App Designer Dropdown in a panel doesn't change position (see comment)

1 view (last 30 days)
I wanted to create an app which makes visible some forms or the other according to the switch position. These dropdowns are always visible, but changing their positions
But I have a problem: when I toggle switch for the first time - two of them don't change position
I change their ".Position" property in a switch callback like this
app.DdS0Model.Position=[611,10,90,22];
app.DdW0Model.Position=[611,6,90,22];
app.DdtoxModel.Position=[611,10,90,22];
It only works properly, when I debug, or toggle switch twice
  1 Comment
Anastasia Eltsova
Anastasia Eltsova on 2 May 2021
I found out that it is somehow connected to the changing titles of panels. I've made a small app with this bug, and it is repeatable.
I made one switch and a dropdown inside a panel (the panel is inside a grid layout):
Callback of the switch:
% Value changed function: Switch
function SwitchValueChanged(app, event)
value = app.Switch.Value;
if(value=="Up")
app.DropDown.Position=[248,393,100,22];
app.PanelWithName.Title="PanelWithName";
else
app.DropDown.Position=[238,168,100,22];
app.PanelWithName.Title='';
end
end
end
And when I toggle switch for the first time app doesn't change position of dropdown
You can find this small app on github:
https://github.com/eltsovaad/AppDesignerBugWithPanels

Answers (0)

Community Treasure Hunt

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

Start Hunting!