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
 Selecting with mouse

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
BionicWave Posted - Feb 15 2012 : 04:28:17
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.
3   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Feb 16 2012 : 08:47:01
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.
BionicWave Posted - Feb 16 2012 : 08:32:31
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.
fab Posted - Feb 15 2012 : 15:12:46
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.