cRemarks = "For a RichTextBox control with setting 1 (Horizontal), " + ; "2 (Vertical), or 3 (Both), you must set the MultiLine property" + ; " to True. At run time, the Microsoft Windows operating " + ; "environment automatically implements a standard keyboard " + ; "interface to allow navigation in RichTextBox controls with " + ; "the arrow keys (UP ARROW, DOWN ARROW, LEFT ARROW, and RIGHT " + ; "ARROW), the HOME and END keys, and so on. Scroll bars are " + ; "displayed only if the contents of the RichTextBox extend beyond " + ; "the control's borders. If ScrollBars is set to False, the " + ; "control won't have scroll bars, regardless of its contents. " + ; "A horizontal scrollbar will appear only when the RightMargin " + ; "property is set to a value that is larger than the width of the " + ; "control. (The value can also be equal to, or slightly smaller " + ; "than the width of the control.)" oShowRTF = CreateObj ("frmShowRTF") oShowRTF.Show () Define Class MyRTFClass as OleControl OleClass = "RICHTEXT.RichTextCtrl.1" OleLCid = 1033 * What properties must be set with the .Object.<PropertyName> syntax * and what must not, in order to things be properly set up and work * as desired ? .Object.Appearance = 1 .Object.BorderStyle = 1 .Object.BulletIndent = 5 .Object.ControlSource = "" .Object.DisabledNoScroll = .F. .Object.Enabled = .T. .Object.FileName = "" .Object.HideSelection = .T. .Object.Locked = .F. .Object.MaxLength = 0 .Object.MultiLine = .T. .Object.ScrollBars = 3 && Both horizontal and vertical scroll bars. .Object.TabStop = .T. .Object.Visible = .T. Appearance = 1 BorderStyle = 1 BulletIndent = 5 ControlSource = "" DisabledNoScroll = .F. Enabled = .T. FileName = "" HideSelection = .T. Locked = .F. MaxLength = 0 MultiLine = .T. ScrollBars = 3 && Both horizontal and vertical scroll bars. TabStop = .T. Visible = .T. EndDefine Define Class frmShowRTF as Form Top = 5 Left = 5 Height = 240 Width = 260 Name = "frmShowRTF" Caption = "RitchText Control Example" AutoCenter = .F. ShowWindow = 0 BorderStyle = 2 Enabled = .T. WindowType = 1 BorderStyle = 3 Add Object oleRTF as MyRTFClass with Top = 5, ; Left = 5, ; Height = 230, ; Width = 250 Procedure Resize If ThisForm.Height < 30 ThisForm.Height = 30 endif ThisForm.oleRTF.Height = Thisform.Height - 10 ThisForm.oleRTF.Width = Thisform.Width - 10 EndProc Procedure Init ThisForm.oleRTF.TextRTF = cRemarks EndProc Procedure Activate With ThisForm MessageBox ("The question is: 'Why the Scroll Bars do not appear ?'"+ Chr (13) + Chr (13) + ; "Here are the 'oleRTF.Object' properties:" + Chr (13) + Chr (13) + ; "RightMargin: " + Chr (9) + lTrim (Str (.oleRTF.Object.RightMargin )) + Chr (13) + ; "BulletIndent: " + Chr (9) + lTrim (Str (.oleRTF.Object.BulletIndent )) + Chr (13) + ; "ScrollBars: " + Chr (9) + lTrim (Str (.oleRTF.Object.ScrollBars )) + Chr (13) + ; "MultiLine: " + Chr (9) + Transform (.oleRTF.Object.MultiLine ) + Chr (13) + ; "DisableNoScroll: " + Chr (9) + Transform (.oleRTF.Object.DisableNoScroll ) + Chr (13) + Chr (13) + ; "And here are the 'oleRTF' properties:" + Chr (13) + Chr (13) + ; "RightMargin: " + Chr (9) + lTrim (Str (.oleRTF.RightMargin )) + Chr (13) + ; "BulletIndent: " + Chr (9) + lTrim (Str (.oleRTF.BulletIndent )) + Chr (13) + ; "ScrollBars: " + Chr (9) + lTrim (Str (.oleRTF.ScrollBars )) + Chr (13) + ; "MultiLine: " + Chr (9) + Transform (.oleRTF.MultiLine ) + Chr (13) + ; "DisableNoScroll: " + Chr (9) + Transform (.oleRTF.DisableNoScroll ) ) EndWith EndProc EndDefine