Rank: Advanced Member Groups: Member
Joined: 9/6/2005 Posts: 51 Points: 6
|
I need to know is there is a way to zoom in and zoom out with using the built in control. What I need to be able to do is set a button to zoom in and a button to zoom out. When that button is clicked it automatically zooms in a certain amount and visa versa. Is this possible? I do not want the user to have to click on a button then click the document to zoom. Then click back on the pointer button.
Thanks in advance
Chris
|
 Rank: Advanced Member Groups: Administration
, Member
Joined: 7/28/2003 Posts: 1,254 Points: -345 Location: WA, US
|
Hello Chris, Quote:Chris Herrington (9/7/2005) I need to know is there is a way to zoom in and zoom out with using the built in control. What I need to be able to do is set a button to zoom in and a button to zoom out. When that button is clicked it automatically zooms in a certain amount and visa versa. Is this possible? I do not want the user to have to click on a button then click the document to zoom. Then click back on the pointer button. Yes, it is possible. Check the following article: Enchancing Interactivity with Client-Side ScriptingIn short you can use following JavaScript code to zoom in and zoom out 1.5 times: Code:
var bitmapViewer1=document.getElementById("<%=BitmapViewer1.ClientID%>");
bitmapViewer1.setZoom(bitmapViewer1.getZoom()*1.5);
Code:
var bitmapViewer1=document.getElementById("<%=BitmapViewer1.ClientID%>");
bitmapViewer1.setZoom(bitmapViewer1.getZoom()*0.66);
Best regards, Fedor Skvortsov
|