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
wxControl* wxDataViewChoiceRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value )
{
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;
c->Move(labelRect.GetRight() - c->GetRect().width, wxDefaultCoord);
c->SetStringSelection( value.GetString() );
return c;