⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (928 Bytes)
Bug #6573
ยป issue_6573.cpp
Roel Standaert, 08/29/2018 05:30 PM
#include
<Wt/WApplication>
#include
<Wt/WContainerWidget>
#include
<Wt/WLineEdit>
#include
<Wt/WServer>
#include
<Wt/WSuggestionPopup>
int
main
(
int
argc
,
char
*
argv
[])
{
return
Wt
::
WRun
(
argc
,
argv
,
[](
const
Wt
::
WEnvironment
&
env
){
auto
app
=
new
Wt
::
WApplication
(
env
);
auto
root
=
app
->
root
();
auto
lineEdit
=
new
Wt
::
WLineEdit
(
root
);
Wt
::
WSuggestionPopup
::
Options
contactOptions
;
contactOptions
.
highlightBeginTag
=
"<span class=
\"
highlight
\"
>"
;
contactOptions
.
highlightEndTag
=
"</span>"
;
contactOptions
.
listSeparator
=
','
;
contactOptions
.
whitespace
=
"
\\
n"
;
contactOptions
.
wordSeparators
=
"-.,
\"
@
\\
n;"
;
contactOptions
.
appendReplacedText
=
", "
;
Wt
::
WSuggestionPopup
*
sp
=
new
Wt
::
WSuggestionPopup
(
contactOptions
,
lineEdit
);
sp
->
forEdit
(
lineEdit
);
sp
->
addSuggestion
(
"ABC <foo@example.com>"
);
sp
->
addSuggestion
(
"DEF <bar@example.com>"
);
return
app
;
});
}
(1-1/1)
Loading...