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:
parent
35b0d4e696
commit
b2cb5e7f3b
1 changed files with 10 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue