+ wxDoChangeForegroundColour(m_formWidget, m_foregroundColour);
+ wxDoChangeForegroundColour(m_buttonWidget, m_foregroundColour);
+ wxDoChangeForegroundColour(m_menuWidget, m_foregroundColour);
+ unsigned int i;
+ for (i = 0; i < m_stringArray.GetCount(); i++)
+ wxDoChangeForegroundColour(m_widgetArray[i], m_foregroundColour);
+}
+
+unsigned int wxChoice::GetCount() const
+{
+ return m_stringArray.GetCount();
+}
+
+void wxChoice::SetString(unsigned int WXUNUSED(n), const wxString& WXUNUSED(s))
+{
+ wxFAIL_MSG( wxT("wxChoice::SetString not implemented") );
+}
+
+wxSize wxChoice::GetItemsSize() const
+{
+ int x, y, mx = 0, my = 0;
+
+ // get my
+ GetTextExtent( "|", &x, &my );
+
+ for (size_t i=0; i<m_stringArray.GetCount(); i++)
+ {
+ GetTextExtent( m_stringArray[i], &x, &y );
+ mx = wxMax( mx, x );
+ my = wxMax( my, y );
+ }
+
+ return wxSize( mx, my );
+}
+
+wxSize wxChoice::DoGetBestSize() const
+{
+ wxSize items = GetItemsSize();
+ // FIXME arbitrary constants
+ return wxSize( ( items.x ? items.x + WIDTH_OVERHEAD : 120 ),
+ items.y + HEIGHT_OVERHEAD );