Hello crazyfwed,
To sync the scroll of 2 tree controls you could put in the control callback for both trees some code similar to this:
int CVICALLBACK TreeCB (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
int s;
switch (event)
{
case EVENT_VSCROLL:
GetCtrlAttribute(panel, PANEL_TREE, ATTR_VSCROLL_OFFSET, &s);
SetCtrlAttribute(panel, PANEL_TREE_2, ATTR_VSCROLL_OFFSET, s);
break;
}
return 0;
}
If you want to sync also the selection, you could handle EVENT_SELECTION_CHANGE:
case EVENT_SELECTION_CHANGE:
SetTreeItemAttribute (panel, PANEL_TREE_2, eventData2, ATTR_SELECTED, eventData1);
break;
Constantin