Fix DoGetBestSize when wxCB_READONLY is used. The best size of the
choice shoudl not be truncated in this case since there isn't a textctrl in this case. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9b12bd993b
commit
d0770e4a91
@ -59,6 +59,9 @@ public:
|
||||
: wxTextCtrl( cb , 1 )
|
||||
{
|
||||
m_cb = cb;
|
||||
|
||||
// remove the default minsize, the combobox will have one instead
|
||||
SetSizeHints(-1,-1);
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -139,6 +142,9 @@ public:
|
||||
: wxChoice( cb , 1 )
|
||||
{
|
||||
m_cb = cb;
|
||||
|
||||
// remove the default minsize, the combobox will have one instead
|
||||
SetSizeHints(-1,-1);
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -156,7 +162,8 @@ protected:
|
||||
virtual wxSize DoGetBestSize() const
|
||||
{
|
||||
wxSize sz = wxChoice::DoGetBestSize() ;
|
||||
sz.x = POPUPWIDTH ;
|
||||
if (! m_cb->HasFlag(wxCB_READONLY) )
|
||||
sz.x = POPUPWIDTH;
|
||||
return sz ;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user