awadh
February 8, 2008, 11:42am
1
Can anyone help how to freeze the diagram ? currently it moves with left right arrow keys…
Jake
February 8, 2008, 1:16pm
2
see GoView Property GoViewDisableKeys.
e.g. view.GoViewDisableKeys = GoViewDisableKeys.ArrowMove;
awadh
February 11, 2008, 12:29am
3
it didn’t work, but
GoViewDisableKeys.ArrowScroll
did the job..
And ur help guided me to do the right thing...thx
One more query from my side - how can we do same job with mouse scroll, i.e. to freeze the diagram on mouse scroll ?
Jake
February 11, 2008, 10:27am
4
public class NoScrollToolManager : GoToolManager { public NoScrollToolManager(GoView v) : base(v) { } public override void DoMouseWheel() { } } Install this custom tool as the default tool, as follows: goView1.DefaultTool = new NoScrollToolManager (goView1);
awadh
February 11, 2008, 11:21pm
5
i freezed the diagram by setting
GoViewDisableKeys.ArrowScroll ,
but user is not accepting, says he user must be able to use up and down arrow keys to scroll up and down and should NOT be able to use left and right keys to scroll horizontally.
So, is it possible to use up/down keys for vertical scroll and DISABLE left/right keys for horizontal scroll ?
If yes, then how can i do that ?
awadh
February 12, 2008, 3:26am
6
can i trap key press for arrow keys ? and know which method is being called to move the diagram on pressing left key…
Jake
February 12, 2008, 7:39am
7
Your user is much too fussy…
Check out this post… slightly different purpose, but gives you the framework for the GoToolManager replacement you need. Navigating GoGroups that are in GoBoxNode
awadh
February 19, 2008, 7:48am
8
i m not getting the reference to ClassDiagramNodeItem while i use the code mentioned in above link in my application .
while i have successfully freezed the diagram on mouse scroll as told by you, and simultaneously i m able to the same with up/down keys.
but the TASK now i have to do is to allow vertical scrolling of the diagram using up/down key press ? ANY IDEA to do this
Jake
February 19, 2008, 8:00am
9
Right. All you want is the “framework” of the code in that note, not the entire thing. The idea is to create your own GoToolManager that overrides DoKeyDown. Then you can handle the scroll keys the way you want to.