ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEnView - Zoom with Select and Scroll
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

UBeyerAtWork

Switzerland
13 Posts

Posted - Jan 24 2014 :  06:11:28  Show Profile  Reply
Hello together,

I want to zoom with Select (miSelectZoom) is working
and scroll with scroll with mouse.

Is this possible?

Thanks Uwe

w2m

USA
1990 Posts

Posted - Jan 24 2014 :  06:53:53  Show Profile  Reply
Uwe,

I think if MouseInteract is set to [miScroll, miSelectZoom], ImageEnView/Vect does not have a way to know if you are trying to zoom or scroll so if you are trying to scroll when you click and drag the mouse there will be a zoom selection instead. You can set MouseInteract to [miScroll, miZoom} however; and both will function.

So the answer to your question is no you can not have [miScroll, miSelectZoom] and have both functional at the same time.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

fourwhey

20 Posts

Posted - Jan 24 2014 :  13:20:29  Show Profile  Reply
I needed to do something similar. I handled it by requiring shift + mousewheel to zoom.
At design time, I set all MouseInteract items as false.
At runtime in the FormCreate I set...
ImageEnView1.MouseWheelParams.Action := iemwVScroll;

and then handled the MouseWheelUp/Down events for ImageEnView1

//====================================================================
// Handles MouseWheel Up zoom interaction for ImageEnView1
// This inverts the default behavior to zoom out rather than in
// Default zoom is disabled, zoom now requires the ctrl key + wheel.
//====================================================================
procedure TForm1.ImageEnView1MouseWheelUp(Sender: TObject;
  Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);
begin

  if ssCtrl in Shift then
  begin
    ImageEnView1.ZoomIn;
    Abort;
  end;
end;

//====================================================================
// Handles MouseWheel Down zoom interaction for ImageEnView1
// This inverts the default behavior to zoom in rather than out
// Default zoom is disabled, zoom now requires the ctrl key + wheel.
//====================================================================
procedure TForm1.ImageEnView1MouseWheelDown(Sender: TObject;
  Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);
begin

  if ssCtrl in Shift then
  begin
    if ImageEnView1.Zoom > 100 then
      ImageEnView1.ZoomOut;
    Abort;
  end;
end;
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: