Make figure data not accessible

Greetings.
I am building a GUI with GUIDE, which contains also a data plot. I would like to allow the users to edit the graphical appearance of the plot created by my application (as by using the set(hObject,'Toolbar','figure') command), but I don't want them to have access to the numerical underlying data (as obtained by lineseries XData and YData). Any idea?
Moreover, the set(hObject,'Toolbar','figure') command allows the user to change the appearance of any object in the GUI, is it possible to restrict its use only to the plot?
Thanks.

Respuestas (3)

Sean de Wolski
Sean de Wolski el 5 de Abr. de 2013

0 votos

Set the 'HandleVisibility' and 'HitTest' of any graphics object you don't want available to 'off'
Crymage
Crymage el 5 de Abr. de 2013

0 votos

Thanks for your quick reply.
Your suggestion solved the second part of the problem. As a sidenote, an user who has changed the ShowHiddenHandles property would still be able to edit the appearance of the other objects?
Still waiting for any advice on how to "protect" the data, since I would like the user to be able to change the appearance of the dataseries (and then I can't use your suggestion in this case, I believe).
Jan
Jan el 5 de Abr. de 2013
Editada: Jan el 5 de Abr. de 2013

0 votos

The user can re-enable the visibility of the handles easily and obtaint the handles of the objects by e.g. findall also, even with disabled HandleVisibility. So disabling the HandleVisibility prevents accidental changes, but not intented ones.
Therefore my answer is: You can't. Matlab allows to access the graphic objects. and blocking this securely does not match the design of Matlab.

Categorías

Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 5 de Abr. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by