conditional ReadOnly Property

Ste_Moore01

Member
Joined
Aug 12, 2013
Messages
6
Programming Experience
3-5
Hi,

I'm creating a UserControl where there are 2 properties, Resizable and ResizeType.

Resizable is a boolean and ResizeType is an integer.

I want ResizeType to be readonly if Resizable is False and writeable if it is True

Is this possible?
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
You can't change whether the property is ReadOnly or not while the program is running, that's a compile time declarative.
What you can do is in the Set part of the ResizeType property is check the Resizeable property to determine whether you accept the new value or not.
 
Top Bottom