Why do I get the error message 'There is no ‹PropertyName› property in the ‹ClassName› class.' ?

11 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Feb 2012
Explanation:
You are attempting to set a property of a graphics object, but that property is not a property of that object. Alternatively, that name does not correspond to a property of that class.
Common causes:
You are attempting to set a property of a graphics object, such as FontName or Callback for a figure, but figure objects have neither a FontName nor a Callback property. If you know that the object has that property, there may be a typographical error in the name of the property.
Solution:
Verify that the name in the SET or GET statement on the line listed in the error message is spelled correctly and that the property you are attempting to access with the SET or GET function is a valid property for that type of Handle Graphics object using the Handle Graphics Object Properties browser.
Example demonstrating this error:
InvalidObjectProperty.m

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Tags

No tags entered yet.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!