Skip to content

Commit

Permalink
Merge pull request #101 from rmpowell77/dev/setSizerAndFit
Browse files Browse the repository at this point in the history
Issue #99: Should attachThis for layout be SetSizer and/or SetSizerAn…
  • Loading branch information
rmpowell77 authored Mar 11, 2023
2 parents 89b153b + d34110b commit e9210dd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion include/wxUI/Layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,15 @@ namespace details {
auto currentFlags = flags ? *flags : wxSizerFlags {};
createAndAddWidgets(parent, sizer, currentFlags);

parent->SetSizerAndFit(sizer);
parent->SetSizer(sizer);
return *this;
}

auto attachToAndFit(wxWindow* parent) -> auto&
{
attachTo(parent);
auto* sizer = parent->GetSizer();
sizer->SetSizeHints(parent);
return *this;
}

Expand Down

0 comments on commit e9210dd

Please sign in to comment.