Пример #1
0
wxSize wxChoice::DoGetBestSize() const
{
    // Get the height of the control from GTK+ itself, but use our own version
    // to compute the width large enough to show all our strings as GTK+
    // doesn't seem to take the control contents into account.
    return GetSizeFromTextSize(wxChoiceBase::DoGetBestSize().x);
}
Пример #2
0
wxSize wxOwnerDrawnComboBox::DoGetBestSize() const
{
    if ( GetCount() == 0 )
        return wxComboCtrlBase::DoGetBestSize();

    wxOwnerDrawnComboBox* odc = const_cast<wxOwnerDrawnComboBox*>(this);
    // TODO: this class may also have GetHightestItemHeight() and
    // GetHightestItem() methods, and so set the whole (edit part + arrow)
    // control's height according with this max height, not only max width.
    return GetSizeFromTextSize(odc->GetWidestItemWidth());
}
Пример #3
0
wxSize wxChoice::DoGetBestSize() const
{
    // The base version returns the size of the largest string
    return GetSizeFromTextSize(wxChoiceBase::DoGetBestSize().x);
}