Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically creating a form with the RTF control
Message
 
 
To
13/02/2002 15:06:34
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00619443
Message ID:
00619785
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
Hi Fernando,

>Thanks for replying Sergey!
>
>I still keep not understanding (after reading the Q156548 article) that object's property setting behavior, but as you told me to, I tryed:
>
> Procedure Init
>  ThisForm.oleRTF.TextRTF           = cRemarks
>  ThisForm.oleRTF.Object.ScrollBars = 3
> EndProc
>
>When I DO the .prg I get a OLE IDispatch exception code 0 from RichTextCtrl: Property is read-only.


You're trying to change the ScrollBars property of RTF control that is read-only in runtime.


>Then I tryed:
>
> Procedure Init
>  ThisForm.oleRTF.TextRTF    = cRemarks
>  ThisForm.oleRTF.ScrollBars = 3
> EndProc
>
>Got no error, but the scroll bars didn't show up.


In this case you change the ScrollBars property of the container not RTF control.

>Shouldn't be a way of setting the object's property in the Define Class?
>
> Define Class MyRTFClass as OleControl
>
> OleClass   = "RICHTEXT.RichTextCtrl.1"
> OleLCid    = 1033
> ScrollBars =    3   <<<<<<<<<<<<<<
> <Other Attributes>
> . . .
>
>Being more specific: how can I set the ScrollBars property to 3 (both scroll bars) and make it work?


It should be
.Object.ScrollBars = 3
I don't know why it doesn't work.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform