Page 1 of 1

Resetting a protected style

Posted: Mon Feb 06, 2006 1:08 pm
by aoven
How does one change a style of an item in code, if the style has a rvprStyleProtect listed in Protection options?

Aleksander

Posted: Mon Feb 06, 2006 5:29 pm
by Sergey Tkachenko
StyleProtect protects from ApplyTextStyle, but does not protect from ApplyStyleConversion (checking this protection option in OnStyleConversion is a good idea, but not necessary).

Or you can temporary remove this option from the style and restore it.

Or you can use nonediting operation: RV.GetItem(i).StyleNo := NewStyle, then call Format.

Posted: Tue Feb 07, 2006 10:43 am
by aoven
Or you can use nonediting operation: RV.GetItem(i).StyleNo := NewStyle, then call Format.
Ah, so this is the one I was looking for, then - thanks!
I saw it already, but was a bit sceptical about using it, since it was a field, not a property.

Aleksander