[CS2/CS3] - TreeViewWidgetMgr & NodeID
Hello,
I'm trying to use WListBoxComposite SDK sample to modify TreeView and add CheckBox for each TreeNode. I changed resource file:
resource WLBCmpNodeWidget (kWLBCmpListElementRsrcID + index_enUS)
{
__FILE__, __LINE__,
kWLBCmpListParentWidgetId, kPMRsrcID_None, // WidgetId, RsrcId
kBindLeft | kBindRight, // Frame binding
Frame(0, 0, 194, 20), // Frame
kTrue, kTrue, // Visible, Enabled
"", // Panel name
{
CheckBoxWidget
(
// CControlView properties
kCheckBoxWidgetID, // widget ID
kSysCheckBoxPMRsrcId, // PMRsrc ID
kBindNone, // frame binding
Frame(15,1,40,18) // left, top, right, bottom
kTrue, // visible
kTrue, // enabled
// TriStateControlAttributes properties
kAlignLeft, // alignment
// CTextControlData properties
"", // control label
),
// Just a info-static text widget with about-box text view to get white bg.
WLBCmpTextWidget
(
kWLBCmpTextWidgetID, kPMRsrcID_None, // WidgetId, RsrcId
kBindLeft | kBindRight, // Frame binding
Frame(45,1,194,18) // Frame
kTrue, kTrue, kAlignLeft,kEllipsizeEnd // Visible, Enabled, Ellipsize style
"", // Initial text
0, // Associated widget for focus
kPaletteWindowSystemScriptFontId, // default font
kPaletteWindowSystemScriptHiliteFontId, // for highlight state.
),
}
I know that method TreeViewWidgetMgr::ApplyDataToWidget uses informations from WLBCmpNodeID class which represents data of tree node. I tried to add a variable to this class which is refering about checkbox state (selected/unselected). But now I have problem to get information in checkbox observer to get NodeID to save state of checkbox in node ? Please could you help me with this problem ?
Thanks, marxin