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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEnView - Zoom with Select and Scroll

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
UBeyerAtWork Posted - Jan 24 2014 : 06:11:28
Hello together,

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

Is this possible?

Thanks Uwe
2   L A T E S T    R E P L I E S    (Newest First)
fourwhey Posted - Jan 24 2014 : 13:20:29
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;
w2m Posted - Jan 24 2014 : 06:53:53
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