From 34b239ec5d9c20a78adaa2dd680bd482b43a68f7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 28 Mar 2011 14:10:31 +0000 Subject: [PATCH] wxDataViewChoiceRenderer's editor control should have the same size as the cell. It looks weird when it's significantly shorter than the content cell being edited. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/datavcmn.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 3e52749a09..10d606aefe 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -1484,7 +1484,14 @@ wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString& choices wxControl* wxDataViewChoiceRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ) { - wxChoice* c = new wxChoice(parent, wxID_ANY, labelRect.GetTopLeft(), wxDefaultSize, m_choices ); + wxChoice* c = new wxChoice + ( + parent, + wxID_ANY, + labelRect.GetTopLeft(), + wxSize(labelRect.GetWidth(), -1), + m_choices + ); c->Move(labelRect.GetRight() - c->GetRect().width, wxDefaultCoord); c->SetStringSelection( value.GetString() ); return c; -- 2.47.2