-void wxPickerBase::DoSetSize(int x, int y, int width, int height, int sizeFlags)
-{
- wxControl::DoSetSize(x, y, width, height, sizeFlags);
-
- int pickerx = 0;
- if (m_text)
- {
- // compute width of the ausiliary textctrl
- int textCtrlW = GetTextCtrlWidth(width);
-
- // set the m_text's position relatively to this window
- m_text->SetSize(0, 0, textCtrlW, height, sizeFlags);
-
- // change position of the real picker
- pickerx += textCtrlW + m_margin;
- width -= textCtrlW + m_margin;
- }
-
- if (m_picker)
- m_picker->SetSize(pickerx, 0, width, height, sizeFlags);
-}
-
-wxSize wxPickerBase::DoGetBestSize() const
-{
- wxSize ret = m_picker->GetBestSize();
-
- if (m_text)
- {
- wxSize sz = m_text->GetBestSize();
-
- ret.SetWidth( ret.GetWidth() + sz.GetWidth() + m_margin );
- ret.SetHeight( wxMax(ret.GetHeight(), sz.GetHeight()) );
- }
-
- return ret;
-}