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
 IERichEdit actions enabled/disabled
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yeohray2

Malaysia
108 Posts

Posted - Dec 20 2022 :  09:29:25  Show Profile  Reply
I have a set of buttons linked to some IE Rich Edit actions (bold, italics etc). These buttons are on a form that's floating above the main form (always-on-top), and the actions are linked to a IE Rich Edit also placed on the same floating form.

When the floating form has focus/is active, the relevant actions are enabled/disabled. When the main form has focus/is active, all the IE Rich Edit actions, and hence my buttons, are disabled.

Is there a way to prevent the IE Rich Edit actions to not be disabled when the floating form does not have focus? I thought setting the RequiresFocus property would do it, but it doesn't seem to be the right property.

Thanks in advance.

Ray

xequte

39053 Posts

Posted - Dec 20 2022 :  14:22:59  Show Profile  Reply
Hi Ray

You can link IERichEdit actions to a specific control by setting the RichEdit property.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yeohray2

Malaysia
108 Posts

Posted - Dec 21 2022 :  08:09:11  Show Profile  Reply
Hi Nigel,

It's not that. It's when the IE Rich Edit control doesn't have focus, then the actions are disabled. Similar to when the IE Rich Edit Toolbar is used - the buttons are disabled when another control gets focus. I guess it's by design?

Ray
Go to Top of Page

xequte

39053 Posts

Posted - Dec 21 2022 :  16:50:12  Show Profile  Reply
Hi Ray

OH, I see. Try setting: IERichEditAction1.RequiresFocus := False;

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

yeohray2

Malaysia
108 Posts

Posted - Dec 22 2022 :  10:31:13  Show Profile  Reply
Hi Nigel, I did set that. I took a look at the actions code, and it appears the HandleControl code for the IE Rich Edit functions disables the action when the AttachedRichEdit isn't the active control, or when the current control isn't a Rich Edit. I'll just let it work this way then, no big deal. Thanks
Go to Top of Page

xequte

39053 Posts

Posted - Dec 22 2022 :  15:00:36  Show Profile  Reply
Hi

Sorry, yes, that is true. In a recent version, we changed to modeling our handling code on the VCL actions.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: