[wxMac 2.8x] wxWindow::DoGetBestSize bug still not solved

Vadim Zeitlin vadim at wxwindows.org
Sat Apr 14 16:13:52 PDT 2007


On Sat, 14 Apr 2007 23:21:17 +0200 H <H at h.com> wrote:

H> no, the problem is in wxWindowBase::DoGetBestSize() during 
H> initialization. When this method is called the scrollbars already exist 
H> but are ignored due to
H> 
H> #ifdef __WXMAC__
H>               && wxHasRealChildren(this)
H> #endif
H> 
H> So, the next "else"-branch is used:
H> 
H>     else // ! has children
H>     {
...
H>         wxSize size = GetMinSize();
H>         if ( !size.IsFullySpecified() )
H>         {
H>             size.SetDefaults(GetSize());
H>             wxConstCast(this, wxWindowBase)->SetMinSize(size);
H>         }
H> 
H>         // return as-is, unadjusted by the client size difference.
H>         return size;
H>     }
H> 
H> But as written in the comments the size is returned as it is (see 
H> above). Namely, wxSize(0, 0). THERE IS NO ADJUSTMENT!

 Wait, but GetSize(), unlike GetClientSize(), should already account for
the scrollbars. Or do you mean that there is a min size set for this
window? I agree that we should add scrollbars (i.e. the difference between
size and client size) in this case. But when the min size is not set (as is
the case here AFAICS) we already should have the correct size. Am I still
missing something?

 Thanks,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list