Actions
Bug #7574
closedbug with WSuggestionPopup wt-4.3.1
Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
05/17/2020
Due date:
% Done:
0%
Estimated time:
Description
WSuggestionPopup no longer works.
The popup listbox appears the first time you enter a letter but does not change when you change the entry,
if you escape the dialog window closes and the popup listbox remains on the screen.
auto Logon = addChild(Wt::cpp14::make_unique<Wt::WDialog>("Connexion"));
Logon->setClosable(true);
Logon->setResizable(true);
Logon->rejectWhenEscapePressed(true);
auto container = Logon->contents();
container->addNew< Wt::WText>(L"Entrez votre nom");
// Set options for email address suggestions:
Wt::WSuggestionPopup::Options contactOptions;
contactOptions.highlightBeginTag = "<span class=\"highlight\">";
contactOptions.highlightEndTag = "</span>";
contactOptions.listSeparator = 0;
contactOptions.whitespace = " \\n";
contactOptions.wordSeparators = "-., \"@\\n;";
contactOptions.appendReplacedText = "";
Wt::WSuggestionPopup* sp = container->addNew<Wt::WSuggestionPopup>(
Wt::WSuggestionPopup::generateMatcherJS(contactOptions),
Wt::WSuggestionPopup::generateReplacerJS(contactOptions));
le = container->addNew<WLineEdit>();
le->setPlaceholderText("Nom");
sp->forEdit(le);
sp->setMaximumSize(Wt::WLength(WLength::Auto), WLength("120px"));
sp->addSuggestion(L"john do");
sp->addSuggestion(L"Patrick Mac ");
sp->addSuggestion(L"Frederic go ");
//.....................
My code still works until version 4.1.1, my testing platform: Windows 10 in Whttp or Isapi mode, wt 4.3.1.
I use this widget in several places in my program and none of them work properly.
I work with a library rebuilt with Visual Studio 2019.
Regards, Patrick
Updated by Patrick ottavi over 4 years ago
i solved my problem:
Addnew or Addwidget is causing a problem i am using Addchild and everything is working normally.
Wt::WSuggestionPopup *sp = container->addChild(Wt::cpp14::make_unique<Wt::WSuggestionPopup>(
Wt::WSuggestionPopup::generateMatcherJS(contactOptions),
Wt::WSuggestionPopup::generateReplacerJS(contactOptions)
));
Updated by Roel Standaert over 4 years ago
- Status changed from New to Closed
Yes indeed, Bruce Toll caught this (issue #7669).
Actions