Author |
Topic  |
|
yeohray2
  
Malaysia
108 Posts |
Posted - Dec 20 2022 : 09:29:25
|
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
|
Hi Ray
You can link IERichEdit actions to a specific control by setting the RichEdit property.
Nigel Xequte Software www.imageen.com
|
 |
|
yeohray2
  
Malaysia
108 Posts |
Posted - Dec 21 2022 : 08:09:11
|
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 |
 |
|
xequte
    
39053 Posts |
Posted - Dec 21 2022 : 16:50:12
|
Hi Ray
OH, I see. Try setting: IERichEditAction1.RequiresFocus := False;
Nigel Xequte Software www.imageen.com
|
 |
|
yeohray2
  
Malaysia
108 Posts |
Posted - Dec 22 2022 : 10:31:13
|
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 |
 |
|
xequte
    
39053 Posts |
Posted - Dec 22 2022 : 15:00:36
|
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
|
 |
|
|
Topic  |
|