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
 Spots Demo
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

bmesser

United Kingdom
234 Posts

Posted - Nov 17 2012 :  02:34:08  Show Profile  Reply
Hi

I have been using the Spots demo and added the same code to add an object to my application. I am now struggling to understand how I can now drag the underlying image (with an object) around when I have zoomed in without the use of scroll bars.

In the demo when you zoom in both scroll bars reappear and the only way I can move round the image with the mouse is by means of these. In a TImageEnView I can kill the scroll bars, zoom in and then drag the current layer around with the mouse. Is it possible to do this in the TImageEnVect? Or is the only way by scroll bars?

Is it just the way that the TImageEnVect component is?

Bruce.

w2m

USA
1990 Posts

Posted - Nov 17 2012 :  08:51:52  Show Profile  Reply
Hi Bruce,

Do you want to move layer 0 around when using objects or layers?

ImageEnVect also allows you to remove the scrollbars and move the background layer around with the mouse as well.
Here with objects all you have to do to move the background layer around when zoomed is to:

procedure TForm1.Button1Click(Sender: TObject);
begin
  if Button1.Down then
  begin
    // turn off the scrollbars
    ImageEnVect1.ScrollBars := ssNone;
    // user can navigate the image with a left click and mouse movement.
    ImageEnVect1.MouseInteract := [miScroll];
    // set the cursor to crHand
    ImageEnVect1.Cursor := 1782;
  end
  else
  begin
    // turn on the scrollbars
    ImageEnVect1.ScrollBars := ssBoth;
    ImageEnVect1.MouseInteract := [];
    // allow selecting objects
    ImageEnVect1.MouseInteractVt := [miObjectSelect];
    ImageEnVect1.Cursor := 1785;
  end;
end;
William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: