Synchronise TreeListener-Events between two Grids [message #63091] |
Tue, 28 April 2009 11:52 |
|
Hi,
probably you remember. Currently i am using two Grids (side by side) to
accomplish the need of fixed columns. Now i have to synchronise the
MouseClick on the "+".
I saw there is a TreeListener which provides the needed events. The Event
carries a GridItem. But what is the best way forward this event to the
scrollable Grid. The GridItem-Objects aren't the same. Only the fixed Grid
contains a column which is showed as tree (setTree(true)).
Any help/tipps/hints is greatly appreciated,
Cheers,
Thomas E.-E.
|
|
|
Re: Synchronise TreeListener-Events between two Grids [message #63119 is a reply to message #63091] |
Tue, 28 April 2009 12:13 |
|
asked this question 5 minutes to early ... but hej now you can participate
in the solution ;-)
// synchronise the "+" click
fixedViewer.addTreeListener(new ITreeViewerListener (){
public void treeCollapsed(TreeExpansionEvent event) {
scrollableViewer.collapseToLevel(
event.getElement(), 1 /* open one level */);
}
public void treeExpanded(TreeExpansionEvent event) {
scrollableViewer.expandToLevel(
event.getElement(), 1 /* close one level */);
}
});
|
|
|
Re: Synchronise TreeListener-Events between two Grids [message #594584 is a reply to message #63091] |
Tue, 28 April 2009 12:13 |
|
asked this question 5 minutes to early ... but hej now you can participate
in the solution ;-)
// synchronise the "+" click
fixedViewer.addTreeListener(new ITreeViewerListener (){
public void treeCollapsed(TreeExpansionEvent event) {
scrollableViewer.collapseToLevel(
event.getElement(), 1 /* open one level */);
}
public void treeExpanded(TreeExpansionEvent event) {
scrollableViewer.expandToLevel(
event.getElement(), 1 /* close one level */);
}
});
|
|
|
Powered by
FUDForum. Page generated in 0.03419 seconds