Read only RichViewEditor

General TRichView support forum. Please post your questions here
Post Reply
Pashtix
Posts: 5
Joined: Tue May 27, 2014 8:58 pm

Read only RichViewEditor

Post by Pashtix »

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!
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

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.
Post Reply