Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make RTF control read only? 1

Status
Not open for further replies.

Neil Toulouse

Programmer
Mar 18, 2002
882
GB
Hi guys!

I dare say this is simple but it is eluding me!!

I have an RTF control on a form displaying some data and I want to make it read only. I have been messing with the LOCKED and SELPROTECTED properties but neither seem to make any difference, I can still type in the control.

Am I missing something obvious (very likely)??!

Thanks
Neil

I like work. It fascinates me. I can sit and look at it for hours...
 
I checked an app that we have that has the RTF box on it.

It has:
Enabeled = .F.
DisableNoScroll = .F.



Alan
 
Neil,

This is one of those cases where you have to drill down into the Object property.

So, instead of this:

Code:
THISFORM.MyRTF.Locked = .T.

you need to do this:

Code:
THISFORM.MyRTF.[b]object.[/b]Locked = .T.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Thanks Mike, that's done the trick :)

I like work. It fascinates me. I can sit and look at it for hours...
 
Interesting, The ones in my app are disabled and scrollable and not locked in the OCX's properties. Its an app I inherited so I'll have to go look and see if their is some other code setting that at runtime.

Alan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top