⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (700 Bytes)
Support #4981
ยป treeview_multiline.cpp
Max Quatember
, 06/15/2016 12:54 PM
namespace
{
class
TestTreeView
:
public
Wt
::
WApplication
{
public:
TestTreeView
(
const
Wt
::
WEnvironment
&
env
)
:
Wt
::
WApplication
(
env
)
{
setCssTheme
(
"polished"
);
Wt
::
WTreeView
*
treeView
=
new
Wt
::
WTreeView
(
root
()
);
treeView
->
resize
(
500
,
500
);
treeView
->
setColumnResizeEnabled
(
true
);
Wt
::
WStandardItemModel
*
model
=
new
Wt
::
WStandardItemModel
(
0
,
1
);
model
->
setHeaderData
(
0
,
Wt
::
Horizontal
,
std
::
string
(
"xxxxxxx"
)
);
std
::
vector
<
Wt
::
WStandardItem
*
>
items
;
items
.
push_back
(
new
Wt
::
WStandardItem
(
"yyyy
\n
zzzz"
)
);
model
->
appendRow
(
items
);
treeView
->
setModel
(
model
);
treeView
->
setColumnWidth
(
0
,
120
);
}
};
}
(1-1/1)
Loading...