The TreeView widget seems to work well as long as the TreeItem 'data' field is a string. However, when I use a CustomNode for the data field the expand/collapse graphic disappears from that TreeItem. My custom node is nothing special - just an HBox that contains a toggle button, a label, and a text field.
var tc = TreeView {
showRoot: false;
root: TreeItem {
data: "never see this";
children: [
TreeItem {
data: "here is question 1"
children: [
TreeItem {
data: tInteger; // this is my custom node
children: [
TreeItem {
data: "here is question 1.1.1";
}
];
}
];
},
]
}
}
var tc = TreeView {
showRoot: false;
root: TreeItem {
data: "never see this";
children: [
TreeItem {
data: "here is question 1"
children: [
TreeItem {
data: tInteger; // this is my custom node
children: [
TreeItem {
data: "here is question 1.1.1";
}
];
}
];
},
]
}
}