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
 Disable ImageEnMView keys
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

w2m

USA
1990 Posts

Posted - Feb 07 2015 :  14:06:55  Show Profile  Reply
If you use ImageEnView1SpecialKey to detect vkup and vkdown to set the ImageEnMView.SelectedImage is it possible to disable the internal ImageEnMView keys so the selected image is not set twice... one in the SpecialKey event and again in the internal key handling of the ImageEnMView component itself?

If you try to set the ImageEnMView.SelectedImage in a TForm1.FormKeyDown event with vkup and vkdown the selected image is set twice. Once in the FormKeyDown event and again in the ImageEnMView component itself with its internal key handling.

How can the internal ImageEnMView key handling be disabled so an external function can set the ImageEnMView selected image?

What I am trying to achieve is one procedure that detects key presses regardless if the form or ImageEnMView has the focus and to increment the Selected index up or down only one time.

Any suggestions on how to achieve this?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development

xequte

38194 Posts

Posted - Feb 07 2015 :  16:52:28  Show Profile  Reply
Hi Bill

Use OnKeyDown to override the internal internal handling of TImageEnMView.

procedure TForm1.ImageEnMView1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
  If DoSomethingWithKey( Key, Shift ) then
    Key := 0;
end;


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

w2m

USA
1990 Posts

Posted - Feb 08 2015 :  12:20:00  Show Profile  Reply
Thanks Nigel, That worked well. I wound up setting the up and down arrows as global hotkeys so that the thumbnails would scroll regardless of what control was the active or focused control. Works perfect.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: