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
 Selecting with mouse
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

BionicWave

Germany
33 Posts

Posted - Feb 15 2012 :  04:28:17  Show Profile  Reply
I have a bitmap that is smaller then the size of imageenview and centered inside imageenview.
I want to achief the following:
When i start selecting with the mousepointer beeing at the left/top most position (outside the bitmap) i want the selection to be
0,0,0,0 (x,y,w,h)
When i move the mouse inside the bitmap the selection should change to
0,0,mousex, mousey

How do i handle this?

Second question:
When i move the mouse to a position that is greater as the with/height of the bitmap, the selction stops at bitmap.width-1
so i cant select the last pixels at the right/bottom end of the bitmap.
Is there a solution to it?

thanks.

fab

1310 Posts

Posted - Feb 15 2012 :  15:12:46  Show Profile  Reply
Having MouseInteract=[miSelect], it is already done. If you start selecting (mouse click) at left/top, outside the bitmap and move inside the bitmap then ImageEn will create a selection from 0,0 to mosueX,mouseY.

About the second question: to select last row/column the mouse must overcome last pixel. A little gap after last row/column should allow this.
Go to Top of Page

BionicWave

Germany
33 Posts

Posted - Feb 16 2012 :  08:32:31  Show Profile  Reply
Thanks Fabrizio. My program works better and better.
Let me come back to your answer for my second question.

Sorry if this sounds silly, but how do i insert that gap?

I tried a panel behind the imageenview, but that doesnt seem to do the trick.
Go to Top of Page

fab

1310 Posts

Posted - Feb 16 2012 :  08:47:01  Show Profile  Reply
quote:
Sorry if this sounds silly, but how do i insert that gap?


The gap should be inserted automatically. Anyway you should make the component few pixels bigger than the image.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: