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
 How to deactivate built-in shortcut CTRL+O?

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
PeterPanino Posted - Mar 26 2021 : 04:23:33
Although the "Open File..." button is NOT VISIBLE on the ImageEnViewToolbar, the shortcut CTRL+O invokes the Open Dialog (and then loads the selected file in ImageEnView).

Is it possible to DEACTIVATE this built-in shortcut CTRL+O (because I provide my own method to load files controlled by my application)?
6   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Mar 31 2021 : 16:53:23
Mid April or so.

Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Mar 31 2021 : 14:47:57
Hi Nigel,

this is very good news. Thank you for your excellent work!

When will the update be available?
xequte Posted - Mar 30 2021 : 18:58:55
Hi Peter

In the upcoming update, keyboard shortcuts can be disabled for toolbars:

ImageEnViewToolbar1.KeyboardShortcuts := False;


Also, the state and execution of toolbar buttons/actions can be customized using new events:

procedure TMainForm.ImageEnViewToolbar1ActionExecute(Action: TBasicAction; var Handled: Boolean);
begin
  // override save handling
  if Action is TImageEnViewSave then
  begin
    SaveCurrentImage();
    Handled := True;
  end;
end;

procedure TMainForm.ImageEnViewToolbar1ActionUpdate(Action: TBasicAction; var Handled: Boolean);
begin
  // Disable opening once we have a valid image
  if Action is TImageEnViewPromptToOpen then
  begin
    TImageEnViewPromptToOpen(Action).Enabled := ImageEnView1.IsEmpty2;
    Handled := True;
  end;
end;


Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Mar 29 2021 : 18:58:30
As a workaround, I have created an Action with the ALT+ENTER shortcut. It seems that Action shortcuts OVERRIDE all other (e.g. menu) shortcuts. This allows me to do my own thing with ALT+ENTER.
PeterPanino Posted - Mar 26 2021 : 12:49:32
This is VERY STRANGE: Now I have DEACTIVATED ImageEnView.LayerOptions.loKeyboardShortcuts which of course also deactivates the ALT+ENTER shortcut at run-time.

So I have assigned the ALT+ENTER shortcut to my own menu-item. But it does not work! When I press the ALT+ENTER keys the mouse cursor shakes a little bit - so this is a sign that it has an effect - but the menu-item handler with the ALT+ENTER shortcut is not triggered!

So I have deactivated LayerOptions.loKeyboardShortcuts and still something blocks my own ALT+ENTER shortcut!? What is going on here?
PeterPanino Posted - Mar 26 2021 : 10:17:59
The same problem arises with the shortcut ALT+ENTER for invoking the Layer Properties dialog:

• I need to prevent the user from invoking the Layer Properties for the Background Layer

• The Layer Properties dialog should be invoked only for a SELECTED LAYER. Instead, the Layer Properties dialog is invoked with the shortcut ALT+ENTER even if no Layer is selected! In this case, it shows the properties of the previously selected Layer! (Which is totally intransparent).

So I need to disable the built-in shortcut ALT+ENTER, so I can control myself when and for what the Layer Properties dialog is invoked.