#18350: wxGridSizer::Hide individual child widgets wont cause it to resize even
after calling wxGridSizer::Layout!
------------------------+--------------------
Reporter: tomay3000 | Owner:
Type: defect | Status: closed
Priority: normal | Milestone:
Component: wxMSW | Version: 3.1.2
Resolution: invalid | Keywords:
Blocked By: | Blocking:
Patch: 0 |
------------------------+--------------------
Changes (by vadz):
* status: new => closed
* resolution: => invalid
Comment:
OK, sorry, I was misled by the bug title. It's not that calling Layout()
doesn't cause the sizer to _re_ size, it does. It's just that
`wxGridSizer` always uses the same size for all its rows and columns and
this doesn't change even if all the elements of the same row (or of the
same column) are hidden. I.e. it behaves exactly the same even if you hide
the items from the very beginning.
If you want the sizer to adapt, just use `wxFlexGridSizer` instead which
is, well, flexible. Granted, `wxGridSizer` behaviour may not seem to be
very useful, but this is what it does. And it's true that in 99% of cases
you want to use `wxFlexGridSizer` instead.
--
Ticket URL: <
https://trac.wxwidgets.org/ticket/18350#comment:5>