[wxPython] wxNotebookSizer calculates wrong MinSize

The wxNotebookSizer calculates a wrong min-Size

If I understood the sources correctly, then the problem is
the use of constants (see below: +5 and +90 and +10 and +40)
for calculating the borders.

Is there a possibility (from wxPython) to Calculate the minsize
by myself (I would have to know the OS-Dependent height/width of the
Tab-selection-Part)

Or better:
will this bug be fixed in the next time?

Greetings Andre'

Some parts of the wxWindows-Source:

···

-----------------------------------------------------
FILE: wxWindows/src/common/sizer.cpp
wxSize wxNotebookSizer::CalcMin()
{
    wxSize sizeBorder = m_notebook->CalcSizeFromPage(wxSize(0, 0));

    sizeBorder.x += 5;
    sizeBorder.y += 5;

    ...
    ...

    return wxSize( maxX, maxY ) + sizeBorder;
}
-----------------------------------------------------
FILE: wxWindows/src/common/nbkbase.cpp
wxSize wxNotebookBase::CalcSizeFromPage(const wxSize& sizePage)
{
    wxSize sizeTotal = sizePage;
    
    if ( HasFlag(wxNB_LEFT) || HasFlag(wxNB_RIGHT) )
    {
        sizeTotal.x += 90;
        sizeTotal.y += 10;
    }
    else
    {
        sizeTotal.x += 10;
        sizeTotal.y += 40;
    }

    return sizeTotal;
}

--
_____________________________________________
inworks GmbH Andre Reitz
Magirusstrasse 44 Tel. 0731/93 80 7-21
89077 Ulm http://www.inworks.de

Andre Reitz wrote:

The wxNotebookSizer calculates a wrong min-Size

If I understood the sources correctly, then the problem is the use of constants (see below: +5 and +90 and +10 and +40)
for calculating the borders.

Is there a possibility (from wxPython) to Calculate the minsize
by myself (I would have to know the OS-Dependent height/width of the Tab-selection-Part)

The only way to do this is to reimplement the wxNotebookSizer in Python as it is not geared up for overloading methods in derived Python classes. But it really shouldn't be that difficult to do the whole thing in Python

Or better:
will this bug be fixed in the next time?

Enter a bug report. I think the real issue is that there isn't a way to determine the size of the tabs on all (any?) of the platforms.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!