Page 1 of 1
					
				about Insert Control
				Posted: Tue Dec 17, 2013 6:32 am
				by iambeijing086
				I Insert some TSRVCheckBox on SRichViewEdit page
and my question is:
How to disable delete these controls?
that means forbid delete these control by press backspace key or delete key.
thanks.
			 
			
					
				
				Posted: Tue Dec 17, 2013 9:06 am
				by Sergey Tkachenko
				You can set rvepDeleteProtect property:
This code inserts delete-protected checkbox:
Code: Select all
  with SRichViewEdit1.ActiveEditor.TopLevelEditor do begin
    BeginUndoGroup(rvutInsert);
    SetUndoGroupMode(True);
    if InsertControl('', CheckBox, rvvaAbsMiddle) then
      SetCurrentItemExtraIntProperty(rvepDeleteProtect, 1, True);
    SetUndoGroupMode(False);
  end;
(but it quite strange to insert as an editing operation a control that cannot be deleted as an editing operation.
 
			
					
				
				Posted: Wed Dec 18, 2013 2:23 am
				by iambeijing086
				thanks very much. it's ok