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
This commit is contained in:
Václav Slavík
2011-03-28 14:10:31 +00:00
parent 385e8575dd
commit 34b239ec5d

View File

@@ -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;