-int wxPickerBase::GetTextCtrlWidth(int given)
-{
- // compute the width of m_text like a wxBoxSizer(wxHORIZONTAL) would do
- // NOTE: the proportion of m_picker is fixed to 1
- return ((given - m_margin) / (m_textProportion + 1)) * m_textProportion;
-}
-
-void wxPickerBase::DoSetSizeHints(int minW, int minH, int maxW, int maxH, int incW, int incH)
-{
- wxControl::DoSetSizeHints(minW, minH, maxW, maxH, incW, incH);
-
- if (m_text)
- {
- // compute minWidth and maxWidth of the ausiliary textctrl
- int textCtrlMinW = -1, textCtrlMaxW = -1;
- if (minW != -1)
- {
- textCtrlMinW = GetTextCtrlWidth(minW);
- minW -= textCtrlMinW + m_margin;
- }