필터 지우기
필터 지우기

How to decrease margins around uibutton in uigridlayout?

조회 수: 9 (최근 30일)
Jan Kudlacek
Jan Kudlacek 2022년 1월 4일
댓글: Jan Kudlacek 2022년 1월 5일
Dear colleagues
How can I shrink the margins around buttons created by uibutton() in the grid layout manager? I would prefer them packed next to each other.
Thank you for any suggestions
Jan Kudlacek
f = uifigure('Position', [200 200 280 60]);
g = uigridlayout(f);
g.RowHeight = {'1x'};
g.ColumnWidth = repelem({'1x'}, 9);
for kb = 1 : 9
uibutton(g, 'push', 'Text', ['B', num2str(kb)])
end

채택된 답변

Turlough Hughes
Turlough Hughes 2022년 1월 4일
Use the ColumnSpacing property:
g.ColumnSpacing = 1;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop uifigure-Based Apps에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by