When operating in read only RichViewEditor I see that menu controls (such as Paste, Bold, Change Color / Font) are not disabled. However nothing happens when they are selected. Isn't this a bug? I want these actions to be disabled when the editor is in the read only mode.
Thanks!
Read only RichViewEditor
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
It was made to support TDBRichViewEdit. TDBRichViewEdit is designed like other DB controls, such as TDBEdit, TDBMemo, TDBRichEdit. It reintroduces ReadOnly property, while inherited ReadOnly property is used internally. For example, inherited ReadOnly is True when a dataset in a browsing state.
So, if RichViewActions would be disabled when TCustomRichViewEdit.ReadOnly=True, they would be disabled for TDBRichViewEdit when its dataset in a browsing state. It's wrong, because they must change dataset in editing state when executed.
So I suggest to disable actions manually. You can assign Action.Disabled = True for all actions that must be disabled.
So, if RichViewActions would be disabled when TCustomRichViewEdit.ReadOnly=True, they would be disabled for TDBRichViewEdit when its dataset in a browsing state. It's wrong, because they must change dataset in editing state when executed.
So I suggest to disable actions manually. You can assign Action.Disabled = True for all actions that must be disabled.