UserMode: Boolean;
The UserMode property determines a mode of work with the object loaded in the OleDocumentBox. By default the property is set to True, the work with the object loaded in the container is performed 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 performed 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 positioned 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 in the OleDocumentBox container and some basic properties that are responsible for the component design are changed.
See also: