ReadOnly

B

Bob Powell [MVP]

Set the Enabled property to false. They will still display content but
you'll not be able to interact with them.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
S

Saradhi

I dont want to do that because ti disables browsing through my Windows form.
For Ex, if I have a control with a scrollbar , making enabling to true makes
the scrollbar also disbled and the user cnat browse thru the data.

I want the user to browse thru the data, but still cant modify it.

-SARADHI
 
H

Herfried K. Wagner [MVP]

Saradhi said:
How do I make all my Controls on the C# windows Form readonly.?

There is no general solution to do that. Some controls support a 'ReadOnly'
property, but this is only the case for a small subset of all Windows Forms
controls. Other controls like the listbox control can be extended to
provide a 'ReadOnly' property with according behavior.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top