Fix wxChoice drop down height without visual theme in wxMSW
When using pre-v6 comctl32.dll (e.g. by disabling the visual styles explicitly or by just not using the manifest), we need to update the drop down height manually, and for this we must ensure that overridden wxChoice::DoMoveWindow() is called from MSWUpdateDropDownHeight(). Closes #19026.
This commit is contained in:
@@ -455,9 +455,18 @@ void wxChoice::MSWEndDeferWindowPos()
|
||||
|
||||
void wxChoice::MSWUpdateDropDownHeight()
|
||||
{
|
||||
int flags = wxSIZE_USE_EXISTING;
|
||||
if ( wxApp::GetComCtl32Version() < 600 )
|
||||
{
|
||||
// Make sure our DoMoveWindow() will get called to update the dropdown
|
||||
// height, this happens automatically with comctl32.dll v6, but not
|
||||
// with earlier versions.
|
||||
flags |= wxSIZE_FORCE;
|
||||
}
|
||||
|
||||
// be careful to not change the width here
|
||||
DoSetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, GetSize().y,
|
||||
wxSIZE_USE_EXISTING);
|
||||
flags);
|
||||
}
|
||||
|
||||
void wxChoice::DoMoveWindow(int x, int y, int width, int height)
|
||||
|
Reference in New Issue
Block a user