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
 Prevent the IMAGE-CHANGED status for ImageEnView1?

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 - Aug 26 2020 : 07:46:50
Making a change to the TImageEnView image, for example:

ImageEnMView1.CopyToIEBitmap(idx, MainForm.formMain.ImageEnView1.IEBitmap, True);


...causes the ImageEnView1 SAVE Toolbar-Button to change from DISABLED to ENABLED

How can I suppress this IMAGE-CHANGED status for ImageEnView1 for any specific cases and thus prevent the enabling of the Save toolbar-button?

BTW, how to temporarily disable a specific Toolbar Button, e.g. IEViewSave_Button_ID?

7   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Aug 30 2020 : 22:43:46
Hi

Before the end of September. You can email us for a pre-release if you like.

Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Aug 28 2020 : 03:05:25
Hi Nigel,

Thanks for the information. When will v9.1.2(+) Release be available?
xequte Posted - Aug 27 2020 : 20:03:47
Hi Peter

In the v9.1.2 beta there is an OnActionExecute event which you can use to react to paste actions.



Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Aug 27 2020 : 04:47:56
However, when pasting with the PASTE TOOLBAR-BUTTON then the SAVE-BUTTON gets ALWAYS ENABLED!

So PLEASE implement TImageEnView.OnPaste event and an event when any Toolbar-Button is clicked to get notified which toolbar-button has been clicked! Thank you!
PeterPanino Posted - Aug 26 2020 : 17:42:13
Working solution:

ImageEnMView1.CopyToIEBitmap(idx, MainForm.formMain.imgMain.IEBitmap, True); 
MainForm.formMain.imgMain.Modified := False;


With this, I don't need to manually disable the SAVE button - it remains disabled!
PeterPanino Posted - Aug 26 2020 : 16:32:51
Hi Nigel,

with the above code:

ImageEnMView1.CopyToIEBitmap(idx, MainForm.formMain.ImageEnView1.IEBitmap, True);


... neither the OnImageChange event-handler nor the OnImageChangeEx event-handler for ImageEnView1 gets triggered - but yet the SAVE button gets activated!

Could you please provide a code example on how to "iterate over the buttons to find the one with the TImageEnViewSave action"? Thank you!

PS: I have tried this code but was stuck on how to access the button's action:

procedure TformMain.DisableSaveToolbarButton;
var
  bt: TImageEnViewButton;
begin
  // iterate over the buttons to find the one with the TImageEnViewSave action and set EnableOnlyWhenChanged := False;

  for bt := Low(TImageEnViewButton) to High(TImageEnViewButton) do
  begin
    // how to find the one with the TImageEnViewSave action?
  end;
end;
xequte Posted - Aug 26 2020 : 16:07:51
Hi Peter

1. In the TImageEnView.OnImageChange event, you can set ImageEnView1.Modified := False;

Alternatively, if you are using a TImageEnViewToolbar (i.e. not the automatic TImageEnView popup toolbar), you could iterate over the buttons to find the one with the TImageEnViewSave action and set EnableOnlyWhenChanged := False;


2. Specific buttons cannot be enabled/disabled as it is handled by TActions. You can only include/exclude buttons using:

https://www.imageen.com/help/TCustomImageEnToolbar.OnAddButton.html
https://www.imageen.com/help/TIEImageEnGlobalSettings.OnAddToolbarButton.html

Nigel
Xequte Software
www.imageen.com