Panning in goview when objects are in fit to wind

Hi all,

I want to pan the goview(using Alt key) when my objects are in fit to window zoom and there are no scroll bars.
Thanks and Regards,
Vinayak

try this:



[Serializable]

public class AltToolPanning : GoToolPanning {

public AltToolPanning(GoView v) : base(v) {

this.AutoPan = false;

}



public override bool CanStart() {

GoInputEventArgs e = this.LastInput;

return (e.Buttons == MouseButtons.Left) && e.Alt;

}



public override void DoKeyDown() {

//base.DoKeyDown();

}

}



install the tool with this in your startup code.



AltToolPanning pTool = new AltToolPanning(this.goView1);

this.goView1.MouseDownTools.Add(pTool);



and you may need to play with GoView.SheetStyle (search this forum)



See this for explanation of the GoKeyDown code.