Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

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

1 visualización (últimos 30 días)
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 comentario
Anastasia Eltsova
Anastasia Eltsova el 2 de Mayo de 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

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by