Custom widget set read only based on dataview setting
I would like to have a function in a custom widget that will set an input box to read only based on the edit-ability setting of the surrounding dataview. I would like to have the input field in the widget to work in the same way that a standard input field would. The standard input fields will be set to read only if the dataview that surrounds the field is set to read only. Does anyone have a piece of sample code that would get me on the right track?
Erwin 't Hoen
When the data view is read only or has no context it will put every widget in disabled state by setting the disabled property:
This will call the corresponding setter, which you will need to implement in your widget: