the StaticBox is occupying the entire size of the panel it is mounted
on.
I've tried making the StaticBox smaller, but it ignores the size
arguments, as in ...
the StaticBox is occupying the entire size of the panel it is mounted
on.
I've tried making the StaticBox smaller, but it ignores the size
arguments, as in ...
Why is the StaticBox ignoring the size parameters?
Because the sizer is (re)setting its size.
How do I change the size of the StaticBox?
It sounds like this sizer is the top level one assigned to the panel, so it is being given the all of the panel's space. If you don't want that then you can use a new sizer assigned ot the panel and then put this staticboxsizer to the new one with flags and/or borders to size and position the staticboxsizer where you want it. Using the WIT will help you visualize how/why the sizers are doing what they are doing.