File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -152,15 +152,22 @@ function update(obj)
152152 if obj .Orientation == " vertical"
153153 obj .Button(idx ).Layout.Column = 1 ;
154154 obj .Button(idx ).Layout.Row = idx ;
155- obj.Grid.ColumnWidth{idx } = obj .DefaultSize ;
156155 else
157156 obj .Button(idx ).Layout.Column = idx ;
158157 obj .Button(idx ).Layout.Row = 1 ;
159- obj.Grid.ColumnWidth{idx } = obj .DefaultSize ;
160158 end % if obj.Orientation == "vertical"
161159
162160 end % for idx = 1:numNew
163161
162+ % Update layout
163+ if obj .Orientation == " vertical"
164+ obj.Grid.ColumnWidth = {obj .DefaultSize };
165+ obj.Grid.RowHeight = repmat({obj .DefaultSize },1 ,numNew );
166+ else
167+ obj.Grid.ColumnWidth = repmat({obj .DefaultSize },1 ,numNew );
168+ obj.Grid.RowHeight = {obj .DefaultSize };
169+ end % if obj.Orientation == "vertical"
170+
164171 end % function
165172
166173
You can’t perform that action at this time.
0 commit comments