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
 Move object white keyboard "up/down/left,right"

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
atwis Posted - Feb 12 2013 : 21:21:42
I saw a sample demo application "layers", here there is facility to add a new screen, how to move the new layer by using the keyboard "Up / Down / Left / Right".
Here are sample images, how to shift the image selected, use the keyboard. I've tried to use this function:

TFormMain.ImageEnView1SpecialKey procedure (Sender: TObject; charcode: Word; Shift: TShiftState; var Handled: Boolean);
begin
    charcode case of
     vk_Left:
       ImageEnView1.MoveSelection (-1, 0);
     vk_Down:
       ImageEnView1.MoveSelection (0, 1);
     vk_Right:
       ImageEnView1.MoveSelection (1, 0);
     vk_Up:
       ImageEnView1.MoveSelection (0, -1);
   end;
end;

but the results have not been able to? is there another solution?
Thanks in advance
2   L A T E S T    R E P L I E S    (Newest First)
atwis Posted - Feb 14 2013 : 21:13:48
Many Thanks
xequte Posted - Feb 13 2013 : 01:19:22
Hi

MoveSelection is for moving a selected region of the image, not a layer, instead use something like:

vk_Up: if assigned(ImageEnView1.CurrentLayer) then
         ImageEnView1.CurrentLayer.PosY := Max(0, ImageEnView1.CurrentLayer.PosY - 10);
...
etc.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com