X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/593ac33e50ab0b01f6186773fa646104d410f365..3f4a2351e4c677c88c18ea812b609477adee7380:/src/msw/choice.cpp?ds=inline diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 3dcb4aa42a..67feff0512 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -26,8 +26,9 @@ #if wxUSE_CHOICE && !(defined(__SMARTPHONE__) && defined(__WXWINCE__)) +#include "wx/choice.h" + #ifndef WX_PRECOMP - #include "wx/choice.h" #include "wx/utils.h" #include "wx/log.h" #include "wx/brush.h" @@ -504,6 +505,8 @@ void wxChoice::DoSetSize(int x, int y, int width, int height, int sizeFlags) { + int heightOrig = height; + // the height which we must pass to Windows should be the total height of // the control including the drop down list while the height given to us // is, of course, just the height of the permanently visible part of it @@ -541,6 +544,11 @@ void wxChoice::DoSetSize(int x, int y, wxControl::DoSetSize(x, y, width, height, sizeFlags); + // If we're storing a pending size, make sure we store + // the original size for reporting back to the app. + if (m_pendingSize != wxDefaultSize) + m_pendingSize = wxSize(width, heightOrig); + // This solution works on XP, but causes choice/combobox lists to be // too short on W2K and earlier. #if 0