[wxPython-dev] SoC Unit Test Status
Robin Dunn
robin at alldunn.com
Thu Jul 12 11:45:27 PDT 2007
Frank Tobia wrote:
> Robin,
>
> On 7/11/07, *Robin Dunn* <robin at alldunn.com <mailto:robin at alldunn.com>>
> wrote:
>
>
> >
> > As for the virtual size failures, I suspect the issue is that
> > SetVirtualSize doesn't allow the virtual size to go below the
> control's
> > current size? Is that correct?
>
> It is limited based on what the virtual size hints are currently set
> to.
> Here is the common (platform independent) base class version:
>
>
> I'm still curious about this, and having problems. SetVirtualSize
> doesn't look like it's using those hints as minima (on Windows).
> For example:
> a.SetVirtualSizeHints(1,1)
> a.SetVirtualSize((2,2))
> a.GetVirtualSize() # does not return 'wx.Size(2,2)'
>
> Am I missing something? Should setting the VirtualSizeHints give me
> control over what range of VirtualSize is possible?
The current client size is factored in.
wxSize wxWindowBase::DoGetVirtualSize() const
{
// we should use the entire client area so if it is greater than our
// virtual size, expand it to fit (otherwise if the window is big
enough we
// wouldn't be using parts of it)
wxSize size = GetClientSize();
if ( m_virtualSize.x > size.x )
size.x = m_virtualSize.x;
if ( m_virtualSize.y >= size.y )
size.y = m_virtualSize.y;
return size;
}
>
> Also, there's no corresponding "GetVirtualSizeHints", which may be
> useful for tests like these.
Enter a bug report about this.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-dev
mailing list