UserMode: Boolean;
The UserMode property determines the mode of work with the object loaded to OleDocumentBox. The property is set to True by default, the work with the object loaded in the container is executed in the end mode, all functions necessary for the user are available. If the property is set to False, the work with the object is executed in the development mode, the properties and functions that are necessary for the developer, but not for the end user, are available.
Executing the example requires a form, a button named Button1 on it and the OleDocumentBox component named OleDocumentBox1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
OleDocumentBox1.CreateObject("RICHTEXT.RichtextCtrl");
OleDocumentBox1.UserMode := False;
OleDocumentBox1.OleObject.SetProperty("ScrollBars", 3);
OleDocumentBox1.OleObject.SetProperty("RightMargin", 1000);
OleDocumentBox1.OleObject.SetProperty("Appearance", 0);
OleDocumentBox1.OleObject.SetProperty("BorderStyle", 0);
OleDocumentBox1.UserMode := True;
End Sub Button1OnClick;
After executing the example on pressing the button, the Richtext component is loaded to the OleDocumentBox container, and some basic properties that are responsible for the component design are changed.
See also: