Let wxChoice determine its size for wxDataViewChoiceRenderer itself, fixes #12193: wxDataViewChoiceRenderer size
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1391,14 +1391,9 @@ wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString& choices
|
|||||||
|
|
||||||
wxControl* wxDataViewChoiceRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value )
|
wxControl* wxDataViewChoiceRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value )
|
||||||
{
|
{
|
||||||
wxString s = value;
|
wxChoice* c = new wxChoice(parent, wxID_ANY, labelRect.GetTopLeft(), wxDefaultSize, m_choices );
|
||||||
wxSize size = labelRect.GetSize();
|
c->Move(labelRect.GetRight() - c->GetRect().width, wxDefaultCoord);
|
||||||
#ifdef __WXMAC__
|
|
||||||
size = wxSize( wxMax(70,labelRect.width ), -1 );
|
|
||||||
#endif
|
|
||||||
wxChoice *c = new wxChoice( parent, wxID_ANY, labelRect.GetTopLeft(), size, m_choices );
|
|
||||||
c->SetStringSelection( value.GetString() );
|
c->SetStringSelection( value.GetString() );
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user