trichview.com

trichview.support




Re: Protected table


Return to index


Author

Message

Sergey Tkachenko

Posted: 09/25/2003 19:32:09


> Hi.

>

> I want to protect a table in RichViewEdit.

> RichViewEdit will have only one table in it, no other items.

>

> * User cannot delete table

> * User can edit each cell

> * Application can add rows/columns

> * Application can remove rows/columns

> * Application can delete table

>

> Can i do this?



Yes. For example, you can call

rve.SetItemExtraIntProperty(ItemNo, rvepDeleteProtect, 1);

where ItemNo - index of table item in rve.

After this, user cannot delete the table, all other operations are not

blocked.

You cannot delete table using editing operations (such as selecting and

deleting selection), but Clear and DeleteItems will work.

Or you can remove protection

rve.SetItemExtraIntProperty(ItemNo, rvepDeleteProtect, 0);


>

>

>

> One other question...

>

> If i place alot of TRichViewEdit on a single form/panel, will it take up

> alot of memory? I m trying to layout pairs of RichViewEdit and buttons on

> a single panel. Number of the pairs can be 10s, or 20s.


This will not take a lot of memory (if editors do not contain huge

documents).

But each control inhertied from TWinControl (including TRichViewEdit and

TButton) consumes one window handle.

This is not a problem in WinNT/2k/XP, but may be a problem in Win9x where a

number of window handles is limited.

But I do not think that 20 pairs is too much.





Powered by ABC Amber Outlook Express Converter