I need to get current editor either TRichViewEdit or TSRichViewEdit from TrvAction.OnUpdate event handler. As I understood http://www.trichview.com/help-actions/t ... ontrol.htm I should check in the next sequence:
1. TRVAControlPanel.DefaultControl
2. TrvAction.Control
3. focused control
4. first found editor component
What does mean ‘first found editor component’? Is this the first controls either TRichViewEdit or TSRichViewEdit which found by recursive iteration of all control of the form?
Is this algorithm correct? Does the implementation of this algorithm already exist, which I could use instead of writing my own?
Receiving the current editor from TAction.OnUpdate
-
- Site Admin
- Posts: 17571
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
TrvAction.Control has a higher priority than TRVAControlPanel.DefaultControl
A target for the action (if Control and DefaultControl are not assigned) is chosen by VCL itself; actually, I do not know myself which control will be chosen if an action does not support a focused control.
In a real application, this situation will confuse users, so I strongly recommend to avoid it either by assigning DefaultControl/Control, or by disabling actions in this case.
A target for the action (if Control and DefaultControl are not assigned) is chosen by VCL itself; actually, I do not know myself which control will be chosen if an action does not support a focused control.
In a real application, this situation will confuse users, so I strongly recommend to avoid it either by assigning DefaultControl/Control, or by disabling actions in this case.