GUI - Align "Distribute" option does not work
이전 댓글 표시
Dear community,
I'm creating a basic GUI where I have inserted a panel and two push buttons.
I would like to uniformly distribute the two pushbuttons inside the panel on the vertical dimension, but the align "distribute" option doesn't work. In fact, the GUI shows the buttons one superimposed to the other (I only see the 2nd button, the 1st is hidden under the 2nd).
Here is the code:
function Global_configuration = UI_Configuration( Global_configuration )
main_UI = figure('Visible','on','Name','UI Configuration', ...
'NumberTitle','off', 'MenuBar','none', ...
'Position',[500 300 600 600]);
main_panel = uipanel(main_UI,'Title','Configure analysis', ...
'Position',[.05 .25 .90 .70]);
b_Configure_simulation = uicontrol(main_panel,'Style','pushbutton', ...
'String','Configure Simulation', ...
'Units','normalized', ...
'Position',[.1 .3 .8 .2], ...
'Callback',{@Configure_Sim, main_UI});
b_Configure_output = uicontrol(main_panel,'Style','pushbutton', ...
'String','Configure Output', ...
'Units','normalized', ...
'Position',[.1 .3 .8 .2], ...
'Callback',{@Configure_Out, main_UI});
align([b_Configure_simulation b_Configure_output],'Center','Distribute');
end
What am I doing wrong?
Thank you in advance.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Exploration and Visualization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!