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
 objects can't response doubleclick event
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

winner

22 Posts

Posted - Oct 27 2012 :  14:11:26  Show Profile  Reply
I draw some box in imageenvector,but these objects can response doubleclick event,why?I set propority of objectselected,but I can't select it ? I found that some object can response objmouseover,but some cant response?

with img1 do
begin
for i := 0 to 10 do
begin
hobj := AddNewObject;
ObjKind[hobj]:= iekBOX;
ObjLeft[hobj]:= 200 ;
ObjTop[hobj]:= 200+40+16*(i);
ObjWidth[hobj]:= 21;
ObjHeight[hobj]:=5;
ObjPenColor[hobj]:=clBlue;
ObjStyle[hobj]:=ObjStyle[hobj]+[ievsSelectable];
ObjName[hobj]:='P'+inttostr(i+1);
end;

procedure TfrmGen.img1ObjectOver(Sender: TObject; hobj: Integer);
begin
stBar1.Panels[0].Text:=img1.ObjName[hobj];
end;

procedure TfrmGen.img1ObjectDblClick(Sender: TObject; hobj: Integer);
begin
stBar1.Panels[1].Text:=img1.ObjName[hobj];
end;

winner

22 Posts

Posted - Oct 30 2012 :  15:44:29  Show Profile  Reply
snap picture


5.92 KB
Go to Top of Page

winner

22 Posts

Posted - Oct 31 2012 :  04:20:25  Show Profile  Reply
which one can help me how to resolve this question ?
thx!
Go to Top of Page

w2m

USA
1990 Posts

Posted - Oct 31 2012 :  06:04:39  Show Profile  Reply
Yor code works just fine here. DoubleClick and OnMouseover work as expected. You may want to try this:
ImageEnVect1.MaxSelectionDistance := 10;
I can not determine what is causing your problem with the code you provided.

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

winner

22 Posts

Posted - Oct 31 2012 :  16:17:09  Show Profile  Reply
thank you .
I try your suggestion. click and dbclick canot response yet.
Go to Top of Page

winner

22 Posts

Posted - Nov 02 2012 :  20:22:49  Show Profile  Reply
I found the reason is the box was coverd by other objects ,so it can't response!
thanks all!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: