summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_listbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/formfiller/cffl_listbox.cpp')
-rw-r--r--fpdfsdk/formfiller/cffl_listbox.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/fpdfsdk/formfiller/cffl_listbox.cpp b/fpdfsdk/formfiller/cffl_listbox.cpp
index 4eb3a7105b..335073293f 100644
--- a/fpdfsdk/formfiller/cffl_listbox.cpp
+++ b/fpdfsdk/formfiller/cffl_listbox.cpp
@@ -43,8 +43,10 @@ std::unique_ptr<CPWL_Wnd> CFFL_ListBox::NewPWLWindow(
const CPWL_Wnd::CreateParams& cp,
std::unique_ptr<CPWL_Wnd::PrivateData> pAttachedData) {
auto pWnd = pdfium::MakeUnique<CPWL_ListBox>(std::move(pAttachedData));
+ if (cp.pParentWnd)
+ cp.pParentWnd->AddChild(pWnd.get());
pWnd->AttachFFLData(this);
- pWnd->Create(cp);
+ pWnd->Realize(cp);
pWnd->SetFillerNotify(m_pFormFillEnv->GetInteractiveFormFiller());
for (int32_t i = 0, sz = m_pWidget->CountOptions(); i < sz; i++)