Page 1 of 1
Readonly = True in DBSRichViewEdit
Posted: Sun Apr 29, 2012 9:59 pm
by alexandreq
Hello Sergey
I put my Editor to readonly=true but I can still write on it.
Why?
I did this two way:
DBSrichViewEdit.Richview.readonly := True
Or
DBSRichViewEdit.ReadOnly := True
nothing happened, I can still write on the editor
Thanks
Alex
Posted: Mon Apr 30, 2012 11:11 am
by alexandreq
Hi,
I noticed that the readonly only works if I have my table opened.
If I call my form and my table is not opened, I can write in the DBSRichViewEdit, but if my table is opened and the readonly is true, it works fine.
Posted: Tue May 01, 2012 6:01 pm
by Sergey Tkachenko
As I understand, the problem happens only if DBSRichViewEdit is linked to a closed table at the beginning: you can type in it.
If you close a table later, all should be correct.
Fix: open DBSRVE.pas, add the last line in constructor TDBSRichViewEdit.Create(AOwner: TComponent):
Code: Select all
TCustomRichViewEdit(RichViewEdit).ReadOnly := True;
Posted: Tue May 01, 2012 6:56 pm
by alexandreq
Sergey,
I did that but a whenI opened the table, all information is not loaded in the DBSRichViewEdit.
Try it you and you will see.;
I need to disable the line you told me to insert.
thanks even so
Posted: Tue May 01, 2012 7:28 pm
by Sergey Tkachenko
Hmm... I cannot reproduce this problem.
I tried both assigning Table.Active=True at designtime, and calling Table.Open in code, it works as expected.
Posted: Tue May 01, 2012 7:52 pm
by alexandreq
Sergey,
Have a table with some information and try to do what you told me to do.
When you open the table, the information should be display in DBSRichViewEdit, but not.
If you remove the line a fixed it, the information will be loaded when you open the table.
Try it.
Posted: Wed May 02, 2012 8:01 pm
by Sergey Tkachenko
Can you create a simple project reproducing this problem?