-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;
- }
-
- if (maxW != -1)
- {
- textCtrlMaxW = GetTextCtrlWidth(maxW);
- maxW -= textCtrlMaxW + m_margin;
- }
-
- m_text->SetSizeHints(textCtrlMinW, minH, textCtrlMaxW, maxH, incW, incH);
- }
-
- if (m_picker)
- m_picker->SetSizeHints(minW, minH, maxW, maxH, incW, incH);
-}
-
-void wxPickerBase::DoSetSize(int x, int y, int width, int height, int sizeFlags)