]> git.saurik.com Git - wxWidgets.git/commitdiff
Let wxChoice determine its size for wxDataViewChoiceRenderer itself, fixes #12193...
authorRobert Roebling <robert@roebling.de>
Sun, 4 Jul 2010 08:22:06 +0000 (08:22 +0000)
committerRobert Roebling <robert@roebling.de>
Sun, 4 Jul 2010 08:22:06 +0000 (08:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/datavcmn.cpp

index 1b2d20cdce980f0f7c248dc8e90f33791e3a3ea2..f7e5749ed1f4313973749465e45a4aced1163969 100644 (file)
@@ -1391,14 +1391,9 @@ wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString& choices
 
 wxControl* wxDataViewChoiceRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value )
 {
-    wxString s = value;
-    wxSize size = labelRect.GetSize();
-#ifdef __WXMAC__
-    size = wxSize( wxMax(70,labelRect.width ), -1 );
-#endif
-    wxChoice *c = new wxChoice( parent, wxID_ANY, labelRect.GetTopLeft(), size, m_choices );
+    wxChoice* c = new wxChoice(parent, wxID_ANY, labelRect.GetTopLeft(), wxDefaultSize, m_choices );
+    c->Move(labelRect.GetRight() - c->GetRect().width, wxDefaultCoord);
     c->SetStringSelection( value.GetString() );
-
     return c;
 }