This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I have a few questions relating to node selection.
1. Is it possible to disable the marquee? I've setup "middle mouse + drag" to pan the graph; but this causes a marquee to draw and selection to change too - which isn't desirable in this case.
2. Is there a way to get notification when the selection changes, besides dependency property change notification attachments or meta-data override hi-jinks? 2a. Is it possible to set the selection programmatically? I've incorporated the flow diagram as part of a complicated application, which provides many simultaneous views of the same model and I need to be able to synchronise selection across those views.
3. The SelectionMode property seems to act strangely, in so much as I can't make it produce "normal" multi-select behaviour: hold to ctrl to add to you current selection, otherwise replace it. I've tried switching the SelectionMode on the ctrl key down/up, but the current selection is forced back to one node when I switch SelectionMode to Single.
-Matt |
|
|
Hello Matt Marquee is automatically disabled when the diagram surface goes into Pan dragging mode. However, you are putting the surface into this mode based on a mouse event. The diagram surface will be getting mouse events first and activating the marquee before you have a chance to change the mode. Try using DiagramSurface.PreviewMouseDown to change the mode before the diagram surface gets normal mouse events. It works for me. DiagramSurface has a SelectedElementChanged event that you may find useful. You should be able to set the selected item by using The SelectedItem property (for setting IDiagramConnection and IDiagramNode) or the SelectedElement property (for setting diagram elements). The selection mode seems to be working fine over here. You should be using SelectionMode.Extended to get the effect that you described. Let me know if there are still problems. Regards |
|
|
Hi Jason, I should have mentioned, we're still using the evaluation binaries - which I assume are at least a little older than the current head rev? I don't see the event you describe, nor any way of setting the surface drag mode, and the selection mode seems to act the same in Multiple and Extended! -Matt |
|
|
Hello Matt In that case you'll just need to download the latest nightly build of the evaluation and you'll be good to go. Regards |
|
|
Marvellous, thanks very much for your help! |
|