Project

General

Profile

Bug #9695

WSuggestionPopup has too low z-index if it is created before the WDialog it is used in

Added by Andreas Frolov 4 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
02/01/2022
Due date:
% Done:

100%

Estimated time:

Description

The example shows that the first WSuggestionPopup appears behind the WDialog.

class MyComboBox : public Wt::WLineEdit
{
public:
  MyComboBox()
  {
    Wt::WSuggestionPopup::Options simpleOptions;
    simpleOptions.highlightBeginTag = "<b>";
    simpleOptions.highlightEndTag = "</b>";
    simpleOptions.listSeparator = 0;

    m_popup = std::make_unique<Wt::WSuggestionPopup>(simpleOptions);
    m_popup->setDropDownIconUnfiltered(true);
    m_popup->forEdit(this, Wt::PopupTrigger::Editing | Wt::PopupTrigger::DropDownIcon);

    m_popup->addSuggestion("Item 1");
    m_popup->addSuggestion("Item 2");
    m_popup->addSuggestion("Item 3");
  }

  std::unique_ptr<Wt::WSuggestionPopup> m_popup;
};

auto layout = std::make_unique<Wt::WVBoxLayout>();
layout->addWidget(std::make_unique<MyComboBox>());

auto dialog = std::make_unique<Wt::WDialog>();

layout->addWidget(std::make_unique<MyComboBox>());

dialog->contents()->setLayout(std::move(layout));
dialog->exec();
#1

Updated by Korneel Dumon 3 months ago

  • Status changed from New to InProgress
  • Assignee set to Korneel Dumon
  • Target version set to 4.7.0
#2

Updated by Roel Standaert 2 months ago

  • Target version changed from 4.7.0 to 4.7.1
#3

Updated by Roel Standaert about 1 month ago

  • Status changed from InProgress to Implemented @Emweb
#4

Updated by Roel Standaert about 1 month ago

  • % Done changed from 0 to 100
#5

Updated by Roel Standaert about 1 month ago

  • Status changed from Implemented @Emweb to Resolved
#6

Updated by Roel Standaert about 1 month ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF